Wraps the base package's table function to allow users
to use this within a pipeline.
table(x, ...)
| x | data within which the |
|---|---|
| ... | arguments to be passed to |
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 2table(tbl, x, y)#> y #> x c d #> a 3 2 #> b 2 2tbl %>% table(x, y)#> y #> x c d #> a 3 2 #> b 2 2