What will be the output of the following R code?
> x <- 1:3
> y <- 10:12
> cbind(x, y)
> 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: Option B
Related Questions on R Programming Basics
What does the function print() do in R?
A. Display the result of a calculation
B. Read input from the user
C. Plot a graph
D. Install a package
What is the purpose of the seq() function in R?
A. Create a sequence of numbers
B. Sort a vector
C. Merge two data frames
D. Compute the mean of a numeric vector

Join The Discussion