table: Cross Tabulation and Table Creation in pipes

Description Usage Arguments Examples

View source: R/table.R

Description

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

Usage

1
table(x, ...)

Arguments

x

data within which the table is to be evaluated

...

arguments to be passed to table

Examples

1
2
3
4
5
6
7
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)
table(tbl, x, y)
tbl %>% table(x, y)

MyKo101/mutils documentation built on July 28, 2020, 8:52 p.m.