\HeaderA{make.groups}{Grouped data from multiple vectors}{make.groups}
\keyword{dplot}{make.groups}
\begin{Description}\relax
Combines two or more vectors, possibly of different lengths, producing
a data frame with a second column indicating which of these vectors
that row came from.  This is mostly useful for getting data into a
form suitable for use in high level Lattice functions.
\end{Description}
\begin{Usage}
\begin{verbatim}
make.groups(...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] one or more vectors of the same type (coercion is attempted if not),
or one or more data frames with similar columns, with possibly
differing number of rows.

\end{ldescription}
\end{Arguments}
\begin{Value}
When all the input arguments are vectors, a data frame with two
columns
\begin{ldescription}
\item[\code{this-is-escaped-codenormal-bracket9bracket-normal}] all the vectors supplied, concatenated

\item[\code{this-is-escaped-codenormal-bracket12bracket-normal}] factor indicating which vector the corresponding \code{data} value
came from

\end{ldescription}

When all the input arguments are data frames, the result of
\code{\LinkA{cbind}{cbind}} applied to them, along with an additional
\code{which} column as described above.
\end{Value}
\begin{Author}\relax
Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{Lattice}{Lattice}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
sim.dat <-
    make.groups(uniform = runif(200),
                exponential = rexp(175),
                lognormal = rlnorm(150),
                normal = rnorm(125))
qqmath( ~ data | which, sim.dat, scales = list(y = "free"))
\end{ExampleCode}
\end{Examples}

