expandArray {implicitExpansion}R Documentation

Expand an Array to a Given Dimension

Description

Expand an array to a given dimension by repeating its entries in the directions where the array has dimension one.

Usage

expandArray(x, dy)

Arguments

x

An object that is coerced to array.

dy

The dimensions it is to be expanded to.

Details

Throws an error if the array and dimensions are not compatible.

Value

An array that consists of the entries in x, with dimension dy.

See Also

expandedDim, mmapply

Examples

x <- 1:3
expandArray(x, c(3,4))


[Package implicitExpansion version 0.1.0 Index]