powered by
xtabs
Provides an update method for "xtabs" objects, typically by removing terms from the formula to collapse over them.
update
"xtabs"
# S3 method for xtabs update(object, formula., ..., evaluate = TRUE)
An existing "xtabs" object
Changes to the formula ? see update.formula for details
update.formula
Additional arguments to the call, or arguments with changed values.
If TRUE, evaluate the new call else return the call
TRUE
If evaluate == TRUE, the new "xtabs" object, otherwise the updated call
evaluate == TRUE
update.formula for details on updates to model formulae
margin.table does something similar, collapse.table collapses category levels
margin.table
collapse.table
# NOT RUN { vietnam.tab <- xtabs(Freq ~ sex + year + response, data=Vietnam) update(vietnam.tab, formula = ~ . -year) # }
Run the code above in your browser using DataLab