What Will Be The Output Of The Following R Codep Pre Langrsplus #490
What will be the output of the following R code?</p> <pre><code class="language-rsplus"> > x <- list(a = 1:5, b = rnorm(10)) > lapply(x, mean) </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs110 R Language. It can also be found in gs gs110 Control Structures, Functions, Scoping Rules, Loop Functions and Debugging - Loop Functions - Quiz No.1.
What will be the output of the following R code?
> x <- list(a = 1:5, b = rnorm(10)) > lapply(x, mean)
$a [1] 3 $b [1] 0.1322028
$a [1] 4 $b [1] 0.1322028
$a [1] 5 $b [1] 0.1322028
$a [2] 5 $b [1] 3