arrIndices: Array indices.

Description Usage Arguments Details Author(s) Examples

View source: R/hoff_functions.R

Description

Generates indices corresponding to subarrays.

Usage

1
arrIndices(saidx)

Arguments

saidx

either a vector of the dimensions of a potential array, or a list of the indices in the subarray.

Details

This function generates a matrix corresponding to all combinations of a list of indices, to be used in subsetting arrays.

Author(s)

Peter Hoff.

Examples

1
2
3
4
# all indices of an array
arrIndices(c(4, 3, 2))
# indices of a subarray
arrIndices(list(c(1, 3), c(4, 5), c(2, 3, 6)))

dcgerard/tensr documentation built on Aug. 16, 2018, 9:56 a.m.