% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unfold.R
\name{unfold}
\alias{unfold}
\title{Unfold indices into a high-dimensional grid}
\usage{
unfold(indexlist, r = NULL, return.array = FALSE)
}
\arguments{
\item{indexlist}{indices to be expanded. Either a list with each member
representing a dimension, or a vector.}

\item{r}{the dimension of the grid to be created. This is only needed if
indexlist is a vector.}

\item{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.
}
\description{
This function is used to expand indices into a grid. Works similar to
\code{\link[base]{expand.grid}}.
}
\examples{
unfold(list(11:12, 21:23), return.array = TRUE)
}
\keyword{mfsd}
