add_matrix {matrixset} | R Documentation |
Add matrices to the matrixset
object
Description
Matrices to add must be of the same dimension and dimnames as .ms
.
Either a named list of matrices can be supplied, or matrices can be specified separaely.
Usage
add_matrix(.ms, ...)
Arguments
.ms |
A |
... |
A single list of matrices (must be a named list), or
individual matrices, e.g. |
Value
A matrixset
with updated matrices.
Examples
m1 <- matrix(1:60, 20, 3)
dimnames(m1) <- dimnames(student_results)
m2 <- matrix(101:160, 20, 3)
dimnames(m2) <- dimnames(student_results)
ms <- add_matrix(student_results, m1=m1, m2=m2)
ms2 <- add_matrix(student_results, list(m1=m1, m2=m2))
[Package matrixset version 0.3.0 Index]