Skip to contents

Summary table with percentages for categorical variables

Usage

freq_table(df, var)

Arguments

df

A dataframe , var A column in said dataframe

Examples

freq_table(mtcars, 'as.factor(cyl)')
#> Warning: `count_()` was deprecated in dplyr 0.7.0.
#>  Please use `count()` instead.
#>  See vignette('programming') for more help
#>  The deprecated feature was likely used in the dplyr package.
#>   Please report the issue at <https://github.com/tidyverse/dplyr/issues>.
#>   as.factor(cyl)  n    prop
#> 1              8 14 0.43750
#> 2              4 11 0.34375
#> 3              6  7 0.21875