asTable.Rd
Create a tabular representation of the response in a balanced
groupedData
object.
asTable(object)
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 object
.
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.
Pinheiro, J. C. and Bates, D. M. (2000), Mixed-Effects Models in S and S-PLUS, Springer, New York.
asTable(Orthodont)
#>
#> 8 10 12 14
#> M16 22.0 21.5 23.5 25.0
#> M05 20.0 23.5 22.5 26.0
#> M02 21.5 22.5 23.0 26.5
#> M11 23.0 23.0 23.5 25.0
#> M07 22.0 22.0 24.5 26.5
#> M08 24.0 21.5 24.5 25.5
#> M03 23.0 22.5 24.0 27.5
#> M12 21.5 23.5 24.0 28.0
#> M13 17.0 24.5 26.0 29.5
#> M14 22.5 25.5 25.5 26.0
#> M09 23.0 20.5 31.0 26.0
#> M15 23.0 24.5 26.0 30.0
#> M06 24.5 25.5 27.0 28.5
#> M04 25.5 27.5 26.5 27.0
#> M01 26.0 25.0 29.0 31.0
#> M10 27.5 28.0 31.0 31.5
#> F10 16.5 19.0 19.0 19.5
#> F09 20.0 21.0 22.0 21.5
#> F06 20.0 21.0 21.0 22.5
#> F01 21.0 20.0 21.5 23.0
#> F05 21.5 23.0 22.5 23.5
#> F07 21.5 22.5 23.0 25.0
#> F02 21.0 21.5 24.0 25.5
#> F08 23.0 23.0 23.5 24.0
#> F03 20.5 24.0 24.5 26.0
#> F04 23.5 24.5 25.0 26.5
#> F11 24.5 25.0 28.0 28.0
# Pinheiro and Bates, p. 109
ergoStool.mat <- asTable(ergoStool)