Summarize by Groups
Provide a summary of the variables in a data frame by groups of rows.
This is most useful with a groupedData
object to examine the
variables by group.
gsummary(object, FUN, omitGroupingFactor, form, level, groups, invariantsOnly, ...)
object |
an object to be summarized - usually a |
FUN |
an optional summary function or a list of summary functions
to be applied to each variable in the frame. The function or
functions are applied only to variables in |
omitGroupingFactor |
an optional logical value. When |
form |
an optional one-sided formula that defines the groups.
When this formula is given, the right-hand side is evaluated in
|
level |
an optional positive integer giving the level of grouping to be used in an object with multiple nested grouping levels. Defaults to the highest or innermost level of grouping. |
groups |
an optional factor that will be used to split the
rows into groups. Defaults to |
invariantsOnly |
an optional logical value. When |
... |
optional additional arguments to the summary functions
that are invoked on the variables by group. Often it is helpful to
specify |
A data.frame
with one row for each level of the grouping
factor. The number of columns is at most the number of columns in
object
.
José Pinheiro and Douglas Bates bates@stat.wisc.edu
Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer.
gsummary(Orthodont) # default summary by Subject ## gsummary with invariantsOnly = TRUE and omitGroupingFactor = TRUE ## determines whether there are covariates like Sex that are invariant ## within the repeated observations on the same Subject. gsummary(Orthodont, inv = TRUE, omit = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.