Q. What will be the Correct R code for the following output?
foo bar
1 1 TRUE
2 2 TRUE
3 3 FALSE
4 4 FALSE
foo bar
1 1 TRUE
2 2 TRUE
3 3 FALSE
4 4 FALSE
β
Correct Answer: (C)
> x <- data.frame(foo = 1:4, bar = c(T, T, F, F))
> x