\Header{reshapeWide-deprecated}{Reshape data frame to wide format}
\keyword{manip}{reshapeWide-deprecated}
\begin{Description}\relax
(EXPERIMENTAL). Convert data frame with repeated measurements in long
format, 1 row per observation to wide format with repeated
observations in multiple variables across rows.\end{Description}
\begin{Usage}
\begin{verbatim}
reshapeWide(x, i=reshape.i, j=reshape.j,
            val=reshape.v, jnames=levels(j))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] The data frame to convert
\item[\code{i}] Factor or numeric. Indicates observations in same row of the
wide format
\item[\code{j}] Factor or numeric. Indicates observations in same column of
wide format
\item[\code{val}] Value to reshape for.
\item[\code{jnames}] Names of new variables in reshaped frame
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{val}, \code{i}, and \code{j} are interpreted relative to
\code{x}.
This essentially places the values of \code{val} in a table defined by
\code{i} and \code{j}, which are assumed to span the data set (exactly
one observation in each cell of their cross-tabulation). Any
other variables in the data frame will be
assumed to have the same value for all values of \code{j} (given
\code{i}) and are
collapsed into a single value.\end{Details}
\begin{Value}
The reshaped data frame.\end{Value}
\begin{Section}{WARNING}
There is no check that the names given to the new
columns are
valid identifiers or unique within the data frame. Variables in
\code{x} are not checked to have constant values given \code{i}.\end{Section}
\begin{Section}{Bugs}
There ought to be a way to have multiple \code{val} variables.\end{Section}
\begin{Note}\relax
The defaults are set to use the names that result
from a call to \code{reshapeLong}.\end{Note}
\begin{SeeAlso}\relax
\code{\Link{reshapeLong}}, \code{\Link{unstack}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
dd<-as.data.frame(matrix(1:24,4))
(dd1<-reshapeLong(dd,V3:V5))
reshapeWide(dd1)
reshapeWide(dd1,jnames=c("A","B","C"))
\end{ExampleCode}
\end{Examples}

