make_barplot1: Create barplots for categorical vars

View source: R/see_cat_vars.R

make_barplot1R Documentation

Create barplots for categorical vars

Description

Create a barplot for a categorical variable with percent and count labels. Good for variable that has ten or less categories. Label size is adjusted based on the number of categories.

Usage

make_barplot1(data, cat_var, label_fmt = TRUE)

Arguments

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

Value

none

Examples

make_barplot1(ggplot2::diamonds, "cut")

sarazong/SZRtools documentation built on Feb. 8, 2024, 6:49 a.m.