View source: R/str2str_functions.R
la2a | R Documentation |
la2a
converts a list of (3D+) arrays to a one dimension larger (3D+)
array where the list dimension becomes the additional dimension of the array.
la2a
is a simple wrapper function for abind::abind
. If you have
a list of matrices, then use lm2a
.
la2a(la, dim.order = 1:(ndim(la[[1]]) + 1L), dimlab.list = NULL, check = TRUE)
la |
list of 3D+ arrays which each have the same dimensions. |
dim.order |
integer vector of length = |
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 |
3D+ array where the list elements of la
is now a dimension. The
order of the dimensions is determined by the argument dim.order
. The
dimnames of the returned array is determined by the dimnames in la[[1]]
and names(la)
.
la <- list("one" = HairEyeColor, "two" = HairEyeColor*2, "three" = HairEyeColor*3)
la2a(la) # default
la2a(la, dimlab.list = "Multiple")
la2a(la, dim.order = c(4,3,1,2))
la2a(la, dim.order = c(4,3,1,2), dimlab.list = "Multiple")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.