.stackArray {wrMisc}R Documentation

Reorganize array by reducing dimension 'byDim' (similar to stack() for data-frames)

Description

This function aims to reorganize an array by reducing dimension 'byDim' (similar to stack() for data-frames) It returns an array/matrix of 1 dimension less than 'arr', 1st dim has more lines (names as paste with '_')

Usage

.stackArray(arr, byDim = 3)

Arguments

arr

(array) main input

byDim

(integer)

Value

This function returns an array/matrix of 1 dimension less than 'arr', 1st dim has more lines (names as paste with '_')

See Also

dist

Examples

(arr1 <- array(11:37, dim=c(3,3,3)))
.stackArray(arr1, 3)

[Package wrMisc version 1.15.1 Index]