freq_table: Frequency Table

Description Usage Arguments Value

Description

freq_table creates a simple frequency table of one or more columns.

Usage

1
2
freq_table(x, ..., cut_fmt = NULL, na_last = FALSE,
  decreasing = FALSE)

Arguments

x

a data.frame or data.table object.

...

The columns to use to create the frequency table, all combinations of the unique levels of the columns will be used to create the rows of the frequenct table.

cut_fmt

a function used to cut a numeric column into descrete levels to use in the table. This parameters currently only supports a single numeric column. Default is set to NULL. cut_fmt supports the following predefined functions:

  • Set cut_fmt = "decile" to cut the numeric column into decile breaks.

  • Set cut_fmt = "quantile" to cut the numneric column into quantile breaks.

na_last

set to TRUE to have any NA values that may be present in the provided columns to be placed in the last row of the frequency table. Default is set to FALSE.

decreasing

if set to TRUE the unique levels of the columns will be presented in a decreasing order. Default is set to FALSE.

Value

A frequency table of the unique levels of the provided columns


jinlow/report.tools documentation built on June 2, 2019, 10:55 p.m.