What Will Be The Output Of The Following R Codep Pre Langrsplus #499
What will be the output of the following R code?</p> <pre><code class="language-rsplus"> > f <- function(elt) { + elt[, 1] + } > lapply(x, f) </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.2.
What will be the output of the following R code?
> f <- function(elt) { + elt[, 1] + } > lapply(x, f)
$a [1] 1 2 $b [1] 1 2 3
$a [1] 1 2 3 $b [1] 1 2 3
$a [1] 1 2 3 $b [1] 1 2
Error