groupedData
object to examine the
variables by group.gsummary(object, FUN, form, level, groups, omitGroupingFactor = FALSE, invariantsOnly = FALSE, ...)
groupedData
object or a data.frame
.object
that vary
within the groups defined by groups
. TRUE
the grouping factor itself will be omitted from the group-wise
summary but the levels of the grouping factor will continue to be
used as the row names for the data frame that is produced by the
object
, converted to a factor if necessary, and the unique
levels are used to define the groups. Defaults to
<getGroups(object, form, level)
.TRUE
only
those covariates that are invariant within each group will be
summarized. The summary value for the group is always the unique
value taken on by that covariate within the group. The columna.rm = TRUE
.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
.summary
, groupedData
,
getGroups
data(Early)
class(Early)
gsummary(Early, groups = Early$id)
gsummary(Early, groups = Early$id, invariantsOnly = TRUE)
Run the code above in your browser using DataCamp Workspace