\HeaderA{asTable}{Convert groupedData to a matrix}{asTable}
\methaliasA{asTable.groupedData}{asTable}{asTable.groupedData}
\keyword{manip}{asTable}
\begin{Description}\relax
Create a tabular representation of the response in a balanced
groupedData object.
\end{Description}
\begin{Usage}
\begin{verbatim}
asTable(object)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] A balanced \code{groupedData} object
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A balanced groupedData object can be represented as a matrix or table
of response values corresponding to the values of a primary covariate
for each level of a grouping factor.  This function creates such a
matrix representation of the data in \code{object}.
\end{Details}
\begin{Value}
A matrix.  The data in the matrix are the values of the response.  The
columns correspond to the distinct values of the primary covariate and
are labelled as such.  The rows correspond to the distinct levels of
the grouping factor and are labelled as such.
\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{References}\relax
Pinheiro, J. C. and Bates, D. M. (2000), \emph{Mixed-Effects Models in S
and S-PLUS}, Springer, New York.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{groupedData}{groupedData}}, \code{\LinkA{isBalanced}{isBalanced}},
\code{\LinkA{balancedGrouped}{balancedGrouped}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
asTable(Orthodont)

# Pinheiro and Bates, p. 109
ergoStool.mat <- asTable(ergoStool)
\end{ExampleCode}
\end{Examples}

