\Header{expand.grid}{Create a Data Frame from All Combinations of Factors}
\keyword{models}{expand.grid}
\begin{Description}\relax
Create a data frame from all combinations of the supplied vectors or
factors. See the description of the return value for precise details of
the way this is done.\end{Description}
\begin{Usage}
\begin{verbatim}
expand.grid(...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] Vectors, factors or a list containing these. 
\end{ldescription}
\end{Arguments}
\begin{Value}
A data frame containing one row for each combination of the supplied
factors. The first factors vary fastest. The columns are labelled by
the factors if these are supplied as named arguments or named
components of a list.\end{Value}
\begin{Author}\relax
B.D. Ripley\end{Author}
\begin{Examples}
\begin{ExampleCode}
expand.grid(height = seq(60, 80, 5), weight = seq(100, 300, 50),
            sex = c("Male","Female"))
\end{ExampleCode}
\end{Examples}

