wrap: Wrap

wrapR Documentation

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

Note

This function is extracted from the R.utils library which is licensed under LGPL>=2.1 and written by Henrik Bengtsson.

Author(s)

Henrik Bengtsson, Jan Philipp Dietrich

See Also

unwrap,fulldim


magclass documentation built on May 29, 2024, 6:20 a.m.