Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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

What is the mode of b in the following R 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.

Join The Discussion