Wraps the base package's table function to allow users to use this within a pipeline.

table(x, ...)

Arguments

x

data within which the table is to be evaluated

...

arguments to be passed to table

Examples

tbl <- data.frame( x = c("a", "a", "b", "a", "a", "b", "b", "b", "a"), y = c("c", "d", "c", "d", "c", "d", "c", "d", "c") ) table(tbl$x, tbl$y)
#> #> c d #> a 3 2 #> b 2 2
table(tbl, x, y)
#> y #> x c d #> a 3 2 #> b 2 2
tbl %>% table(x, y)
#> y #> x c d #> a 3 2 #> b 2 2