nlme (version 3.1-86)

collapse.groupedData: Collapse a groupedData Object

Description

If 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.

Usage

## S3 method for class 'groupedData':
collapse(object, collapseLevel, displayLevel,
       outer, inner, preserve, FUN, subset, \dots)

Arguments

Value

a 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.

References

Pinheiro, J.C. and Bates, D.M. (1997) "Future Directions in Mixed-Effects Software: Design of NLME 3.0" available at http://franz.stat.wisc.edu/pub/NLME.

See Also

groupedData, plot.nmGroupedData

Examples

Run this code
# collapsing by Dog
collapse(Pixel, collapse = 1)  # same as collapse(Pixel, collapse = "Dog")

Run the code above in your browser using DataCamp Workspace