m
should be a matrix.
mat_byname(data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL, m = matrix(data = data, nrow = nrow, ncol = ncol, byrow = byrow, dimnames = dimnames), rowtype = NULL, coltype = NULL)
data | a vector of values for |
---|---|
nrow | the number of rows in |
ncol | the number of columns in |
byrow | tells whether to fill |
dimnames | row and column names for |
m | a |
rowtype | the type for rows |
coltype | the type for columns |
a mat_byname
object
If is.null(m)
, NULL
is returned.
If all(is.na(m))
, NA
is returned.
If m
is not a matrix
, an error is given.
#> [,1] #> [1,] 1 #> attr(,"class") #> [1] "mat_byname" "matrix"