Finds the frequency of the categorical variables in a data frame and returns the histogram of each categorical variable.

describe_cat_var(dataframe, cat_vars)

Arguments

dataframe

tbl. The dataframe to be inspected.

cat_vars

vector of character strings of the names of the categorical variables.

Value

ggplot object to plot histogram of the categorical variables

Examples

X <- dplyr::tibble(type = c('Car','Bus','Car'), height = c(10,20,30)) cat_vars <- c('type') describe_cat_var(X, cat_vars)