make_hbarplot | R Documentation |
Create a horizontal barplot for a categorical variable with percent and count labels. Good for variable that has greater than ten categories.
make_hbarplot(data, cat_var, label_fmt = TRUE)
data |
dataset that contains the categorical variable |
cat_var |
name of the categorical variable to be plotted as a string |
label_fmt |
boolean to indicate whether plot labels should be formatted |
none
make_hbarplot(ggplot2::diamonds, "cut")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.