What Will Be The Output Of The Following R Functionp Pre #122
What will be the output of the following R function?</p> <pre><code class="language-rsplus">ab <- list(1, 2, 3, "X", "Y", "Z") dim(ab) <- c(3,2) print(ab)</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 Getting Started - Console Input and Evaluation - Quiz No.2.
What will be the output of the following R function?
ab <- list(1, 2, 3, "X", "Y", "Z") dim(ab) <- c(3,2) print(ab)
1 “X” 2 “Y” 3 “ Z”
1 “X” 2 “Y” 3 “ Y”
1 “W” 2 “Y” 3 “ Z”
Error