Vidyalelo
R Programming · Q102

Data Structures in R Programming

Programming · R Programming · question 102

Q102

Which of the following R code extracts the second column for the following matrix? > x <- matrix(1:6, 2, 3)

A.
x[2, ]
B.
x[1, 2]
C.
x[, 2]
Answer
D.
x[1 1 2]

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board