How could be the matrix constructed by using the following R code? [code] m <- matrix(1:6, nrow = 2, ncol = 3)[/code]

How could be the matrix constructed by using the following R code?
Code:
 m <- matrix(1:6, nrow = 2, ncol = 3)
A. row-wise
B. column-wise
C. any manner
D. data insufficient
 
Answer: b
Explanation: If nothing is mentioned, matrix is created column-wise. If we want in row-wise then we have to specify. We have to mention “by row” to create a matrix in row wise. The filter( ) function is used to extract subsets of rows from a data frame. This function is similar to the existing subset( ) function.
 

Tìm kiếm

Back
Top