magclass (version 4.107.0)

wrap: Wrap

Description

Reshape an array or a matrix by permuting and/or joining dimensions.

Usage

wrap(x, map = list(NA), sep = ".")

Arguments

x

An array

map

A list of length equal to the number of dimensions in the reshaped array. Each element should be an integer vectors specifying the dimensions to be joined in corresponding new dimension. One element may equal NA to indicate that that dimension should be a join of all non-specified (remaining) dimensions. Default is to wrap everything into a vector.

sep

A character separating joined dimension names

See Also

unwrap,fulldim