Vidyalelo
R Programming · Q59

Control Structures in R Programming

Programming · R Programming · question 59

Q59

What will be the output of the following R code? > x lapply(x, function(elt) elt[,1] )

A.
$a
[1] 1 2
$b
[1] 1 2 3
Answer
B.
$a
[1] 1 2 3
$b
[1] 1 2 3
C.
$a
[1] 1 2 3
$b
[1] 1 2
D.
Error

Answer: Option A

Solution

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