dim2multidim: Transform a specific dimension of an array into a...

Description Usage Arguments Value See Also

View source: R/array_transform.R

Description

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.

Usage

1
dim2multidim(dat, whichdim, datfr)

Arguments

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)

Value

An array

See Also

expand.grid


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.