table_percent: table_percent

Description Usage Arguments

View source: R/table_percent.R

Description

This is a wrapper function for table. It adds percentages to existing counts normally returned by table. This is only written for 1 or 2 variable.

Usage

1
2
table_percent(x, y = NULL, direction = "row", total = "both",
  useNA = "ifany", rnd = 1)

Arguments

x

first variable to tabulate

y

(optional) second variable to tabulate

direction

"row" or "col" for horizontal vs vertical percentages

total

"both", "row" or "col" for totals columns

useNA

"none","ifany","always" passed directly to table

rnd

round percentages to this many decimal places. This uses roundWZero to force zeros to remain in decimals.


csmoxford/prettyTables documentation built on May 14, 2019, 12:24 p.m.