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 will be the output of the following R code?
> x < – data.frame(foo = 1:4, bar = c(T, T, F, F))
> ncol(x)

What will be the output of the following R code?
> x < - data.frame(foo = 1:4, bar = c(T, T, F, F))
> ncol(x)
a) 2
b) 4
c) 7
d) 9

Answer: a
Explanation: Data frames are represented as a special type of list where every element of the list has to have the same length.

Join The Discussion