What Will Be The Output Of The Following R Codep Pre Langrsplus #301
What will be the output of the following R code?</p> <pre><code class="language-rsplus"> > x <- matrix(1:4, 2, 2) > y <- matrix(rep(10, 4), 2, 2) > x * y </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 - Vectorized Operations - Quiz No.1.
What will be the output of the following R code?
> x <- matrix(1:4, 2, 2) > y <- matrix(rep(10, 4), 2, 2) > x * y
[,1] [,2] [1,] 10 30 [2,] 20 40
[,1] [,2] [1,] 10 30 [2,] 30 40
[,1] [,2] [1,] 20 30 [2,] 20 40
Error