unfold: Unfold indices into a high-dimensional grid

Description Usage Arguments Value Examples

Description

This function is used to expand indices into a grid. Works similar to expand.grid.

Usage

1
unfold(indexlist, r = NULL, return.array = FALSE)

Arguments

indexlist

indices to be expanded. Either a list with each member representing a dimension, or a vector.

r

the dimension of the grid to be created. This is only needed if indexlist is a vector.

return.array

a boolean indicating whether an array should be returned or a list.

Value

a list or an array with the coordinates of the grid.

Examples

1
2
3
4
## Not run: 
fsd:::unfold(list(11:12, 21:23), return.array = TRUE)

## End(Not run)

kuenzer/fsd documentation built on July 21, 2020, 1:57 p.m.