adplus-dvertising
frame-decoration

Question

What will be the output of the following R code?
> x <- list(a = 1:5, b = rnorm(10))
> lapply(x, mean)

a.

$a
[1] 3
$b
[1] 0.1322028

b.

$a
[1] 4
$b
[1] 0.1322028

c.

$a
[1] 5
$b
[1] 0.1322028

d.

$a
[2] 5
$b
[1] 3

Answer: (a).$a
[1] 3
$b
[1] 0.1322028

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following R code?