cross_tabulate: Cross Tabulate Counts

View source: R/cross_tabulate.R

cross_tabulateR Documentation

Cross Tabulate Counts

Description

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.

Usage

cross_tabulate(x, ...)

Arguments

x

A soma_adat or data.frame object containing the meta data from which counts are desired.

...

A number of un-quoted expressions separated by commas. Generally greater than 3 is un-useful.

Value

A table of grouped counts based on splitting variables with sums from each factor.

Author(s)

Stu Field

See Also

table(), addmargins()

Examples

# 1 factor
cross_tabulate(mtcars, cyl)
# 2 factors
cross_tabulate(mtcars, cyl, gear)
# 3 factors
cross_tabulate(mtcars, cyl, gear, am)

stufield/stuRpkg documentation built on April 2, 2022, 2:05 p.m.