Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

update.xtabs

Update method for a xtabs object


Description

Provides an update method for "xtabs" objects, typically by removing terms from the formula to collapse over them.

Usage

## S3 method for class 'xtabs'
update(object, formula., ..., evaluate = TRUE)

Arguments

object

An existing "xtabs" object

formula.

Changes to the formula ? see update.formula for details

...

Additional arguments to the call, or arguments with changed values.

evaluate

If TRUE, evaluate the new call else return the call

Value

If evaluate == TRUE, the new "xtabs" object, otherwise the updated call

Author(s)

Michael Friendly

See Also

update.formula for details on updates to model formulae

margin.table does something similar, collapse.table collapses category levels

Examples

vietnam.tab <- xtabs(Freq ~ sex + year + response, data=Vietnam)

update(vietnam.tab, formula = ~ . -year)

vcdExtra

'vcd' Extensions and Additions

v0.7-5
GPL (>= 2)
Authors
Michael Friendly [aut, cre], Heather Turner [ctb], Achim Zeileis [ctb], Duncan Murdoch [ctb], David Firth [ctb]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.