object
has a single grouping factor, it is returned
unchanged. Else, it is summarized by the values of the
displayLevel
grouping factor (or the combination of its values
and the values of the covariate indicated in preserve
, if any is
present). The collapsed data is used to produce a new
groupedData
object, with grouping factor given by the
displayLevel
factor.## S3 method for class 'groupedData':
collapse(object, collapseLevel, displayLevel,
outer, inner, preserve, FUN, subset, \dots)
groupedData
object with a single grouping factor given by the
displayLevel
grouping factor, resulting from collapsing
object
over the levels of the collapseLevel
grouping
factor.groupedData
, plot.nmGroupedData
data(Pixel)
# collapsing by Dog
collapse(Pixel, collapse = 1) # same as collapse(Pixel, collapse = "Dog")
Run the code above in your browser using DataLab