(3D+) Array to List of (3D+) Arrays
a2la
converts an (3D+) array to a list of (3D+) arrays. This function
is a simple wrapper for asplit(x = a, MARGIN = along)
.
a2la(a, along = ndim(a), check = TRUE)
a |
(3D+) array |
along |
integerish vector of length 1 specifying the dimension to split
the array along. Default is the last dimension of |
check |
logical vector of length 1 specifying whether to check the structure
of the input arguments. For example, check whether |
list of arrays where each array is one dimension less than a
and the names of the list are dimnames(a)[[along]]
.
# without dimnames a <- abind::abind(HairEyeColor*1, HairEyeColor*2, HairEyeColor*3, along = 4L) a2la(a) # with dimnames a <- abind::abind("one" = HairEyeColor*1, "two" = HairEyeColor*2, "three" = HairEyeColor*3, along = 4L) a2la(a) a2la(a, along = 1) # along = 1
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.