What Will Be The Output Of The Following R Codep Pre Langrsplus #289
What will be the output of the following R code?</p> <pre><code class="language-rsplus"> > x <- list(foo = 1:4, bar = 0.6, baz = "hello") > name <- "foo" > x[[name]] </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 R - Data Storage, Formats, Objects and Operations - Subsetting - Quiz No.2.
What will be the output of the following R code?
> x <- list(foo = 1:4, bar = 0.6, baz = "hello") > name <- "foo" > x[[name]]
1 2 3 4
0 1 2 3
1 2 3 4 5
All of the mentioned