R/eda.R
describe_cat_var.Rd
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)
dataframe | tbl. The dataframe to be inspected. |
---|---|
cat_vars | vector of character strings of the names of the categorical variables. |
ggplot object to plot histogram of the categorical variables
X <- dplyr::tibble(type = c('Car','Bus','Car'), height = c(10,20,30)) cat_vars <- c('type') describe_cat_var(X, cat_vars)