tabulate_categorical: Tabulate categorical variable

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Tabulate categorical variable

Usage

1
2
3
4
tabulate_categorical(x,
variable_name, 
round_digits = 1,
useNA = c("ifany", "always", "no"))

Arguments

x

variable object for tabulation

variable_name

String variable name to include in first column of output table.

round_digits

integer to define how many digits to round the percentage

useNA

whether to include NA values in the table. See ‘Details’. Can be abbreviated.

Details

useNA controls if the table includes counts of NA values: the allowed values correspond to never ("no"), only if the count is positive ("ifany") and even for zero counts ("always").

Value

data frame with one row per unique value within the input variable and columns containing the unique values and their counts with associated percentages

Author(s)

Jay Achar

See Also

statr

Examples

1
tabulate_categorical(mtcars$vs, variable_name = "VS")

JayAchar/statr documentation built on May 10, 2019, 2:40 p.m.