Skip to contents

Obtain Frequencies and Proportions for a Categorical Variable

Usage

cat_stats(x, y = NULL, prop = "all", df = FALSE, tbl_df = FALSE, digits = 4)

Arguments

x

Vector

y

Vector for Cross-tabulations.

prop

Character indicating what type of proportions to provide. Defaults to "all".

df

Logical indicating to provide a tibble for cross tabulations with table proportions.

tbl_df

Logical indicating if you need a df for a single variable for a pie chart or other things.

digits

number of decimal places to round