This section provides details on the construction and manipulation of these objects, including matrix facilities that are different from typical element-wise operations.
Matrices
A matrix is just an array with two subscripts. However, it is such an important special case it needs a separate discussion.
R contains many operators and functions that are available only for
matrices. For example t(X)
is the matrix transpose function, as
noted above. The functions nrow(A)
and ncol(A)
give the
number of rows and columns in the matrix A
respectively.
Source: R Core Team, https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Arrays-and-matrices
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.