make_hbarplot: Horizontal Barplot for Categorical Var

View source: R/see_cat_vars.R

make_hbarplotR Documentation

Horizontal Barplot for Categorical Var

Description

Create a horizontal barplot for a categorical variable with percent and count labels. Good for variable that has greater than ten categories.

Usage

make_hbarplot(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_hbarplot(ggplot2::diamonds, "cut")

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