cat_entry: Add a categorical variable summary row to the table

Description Usage Arguments

View source: R/cat_entry.r

Description

This function adds a categorical variable summary row to a table object.

Usage

1
2
cat_entry(tbl, x, y = initial_approach, dt = data, xlab = NULL,
  fun = NULL, ...)

Arguments

tbl

The table object. (This input is generally not specified because the tbl object is passed via the %>% operator. See examples.)

x

Name of the row categorical variable. This is the non-standard implementation, so do not quote the name or provide it with a character string object.

y

Name of the column categorical variable. Do not provide a character string. Generally, this parameter is specified in the table header and not in this function.

dt

The data.table where the variables x and y reside. Generally, this parameter is specified in the table header and not in this function.

xlab

Character string. Text will be the label of the categorical entry in the table. If not specified, function defaults to label(x) if available. As a last resort, the function will print the variable name.

fun

Function which summarizes the table(x, y, usaNA = "always") object. Defaults to count_pct which provides N (pct).

...

Options passed to fun. These generally include pvalue and fmt.


thomasgstewart/tangram.pipe documentation built on Nov. 18, 2017, 10:18 p.m.