
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 done with asTable
.balancedGrouped(form, data, labels=NULL, units=NULL)
groupedData
object.groupedData
, isBalanced
, asTable
data(Orthodont)
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, ] ## check the first few entries
Run the code above in your browser using DataLab