powered by
For a contingency table in array form, compute a list of conditional tables given some margins.
co_table(x, margin, collapse = ".")
A list of the resulting conditional tables.
a contingency table in array form.
margin index(es) or corresponding name(s) of the conditioning variables.
character used when collapsing level names (if more than 1 margin is specified).
margin
Achim Zeileis Achim.Zeileis@R-project.org
This is essentially an interface to [ which is more convenient for arrays of arbitrary dimension.
[
data("HairEyeColor") co_table(HairEyeColor, 1) co_table(HairEyeColor, c("Hair", "Eye")) co_table(HairEyeColor, 1:2, collapse = "")
Run the code above in your browser using DataLab