lm2a converts a list of matrices to a 3D array where the list dimension
becomes the third dimension of the array (layers). lm2a is a simple
wrapper function for abind::abind.
3D array where the list elements of lm is now a dimension. The
order of the dimensions is determined by the argument dim.order with dimnames
specified by names(lm). The dimnames of the returned array is determined
by the dimnames in lm[[1]] and names(lm).
Arguments
lm
list of matrices which each have the same dimensions.
dim.order
integer vector of length 3 specifying the order of dimensions for
the returned array. The default is c(1,2,3) which means the rows of the
matrices in lm is the first dimension (i.e., rows), the columns of the
matrices in lm is the second dimension (i.e., columns), and the list
elements of lm is the third dimension (i.e., layers).
dimlab.list
character vector of length 1 specifying the dimlabel for
the list dimension.
check
logical vector of length 1 specifying whether to check the structure
of the input arguments. For example, check whether lm is a list of matrices.
This argument is available to allow flexibility in whether the user values
informative error messages (TRUE) vs. computational efficiency (FALSE).