View source: R/cross_tabulate.R
cross_tabulate | R Documentation |
Create a contingency table of counts generated by cross-classifying
factors from groups splitting on the values passed in the ...
argument.
The sums of each row and column are added to the result.
cross_tabulate(x, ...)
x |
A |
... |
A number of un-quoted expressions separated by commas. Generally greater than 3 is un-useful. |
A table of grouped counts based on splitting variables with sums from each factor.
Stu Field
table()
, addmargins()
# 1 factor cross_tabulate(mtcars, cyl) # 2 factors cross_tabulate(mtcars, cyl, gear) # 3 factors cross_tabulate(mtcars, cyl, gear, am)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.