What is the mode of b in the following R code? [code] b <- c(TRUE, TRUE, 1)[/code]

What is the mode of b in the following R code?
Code:
     b <- c(TRUE, TRUE, 1)
A. Numeric
B. Character
C. Integer
D. Logical
 
Answer: a
Explanation: All the elements in ‘b’ can be expressed in numeric. Both paste() and cat() will printout text to the console by combining multiple character vectors together. The original data are formatted as character strings so we convert them to R’s Data format for easier manipulation.
 

Tìm kiếm

Back
Top