.\" -*- nroff -*- generated from .Rd format
.BG
.FN balancedGrouped
.TL
Create a groupedData object from a matrix
.DN
Create a `groupedData' object from a data matrix.  This function
can be used only with balanced data.  The opposite conversion, from a
`groupedData' object to a `matrix', is performed by `asTable'.
.CS
balancedGrouped(form, data, labels=NULL, units=NULL)
.RA
.AG form
A formula of the form `y ~ x | g' giving the name of
the response, the primary covariate, and the grouping factor.
.AG data
A matrix or data frame containing the values of the
response grouped according to the levels of the grouping factor
(rows) and the distinct levels of the primary covariate (columns).
The `dimnames' of the matrix are used to construct the levels of
the grouping factor and the primary covariate.
.AG labels
an optional list of character strings giving labels for
the response and the primary covariate.  The label for the primary
covariate is named `x' and that for the response is named
`y'.  Either label can be omitted.
.AG units
an optional list of character strings giving the units for
the response and the primary covariate.  The units string for the
primary covariate is named `x' and that for the response is
named `y'.  Either units string can be omitted.
.RT
A balanced `groupedData' object.

.SA
`groupedData',`isBalanced',`asTable'
.EX
OrthoMat <- asTable( Orthodont )
Orth2 <- balancedGrouped(distance ~ age | Subject, data = OrthoMat,
    labels = list(x = "Age",
       y = "Distance from pituitary to pterygomaxillary fissure"),
    units = list(x = "(yr)", y = "(mm)"))
Orth2[ 1:10, ] 
.KW data
.WR
