Description Usage Arguments Value See Also
View source: R/array_transform.R
dim2multidim
transforms a user-specified dimension of an array into a
multidimensional array while keeping other dimensions intact. It can be
conceived of as the inverse of expand.grid on the specified dimension.
1 | dim2multidim(dat, whichdim, datfr)
|
dat |
is the input matrix or array |
whichdim |
is the target dimension to be expanded (can be a numerical index, a character string specifying the dimension name or a logical vector). If whichdim is a string, dat must have named dimnames. |
datfr |
a data.frame or matrix with the combination of factor levels (e.g., the result of a call to expand.grid) |
An array
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.