Que: What will be the output of the following R code?

> x <- 1:3
> y <- 10:12
> cbind(x, y)
a. x y[1,] 6 10[2,] 7 11[3,] 8 12
b. x y[1,] 1 10[2,] 2 11[3,] 3 12
c. x y[1,] 1 4[2,] 2 5[3,] 3 6
d. x y[1,] 1 6[2,] 2 5[3,] 3 10
Answer: x y[1,] 1 10[2,] 2 11[3,] 3 12

Leave a Comment