Create a barplot to explore a categorical variable. If a target is selected, the barplot is created for all levels of the target.
explore_bar(
data,
var,
target,
flip = NA,
title = "",
numeric = NA,
max_cat = 30,
max_target_cat = 5,
color = c("#ADD8E6", "#7BB8DA"),
legend_position = "right",
label,
label_size = 2.7,
...
)
Plot object (bar chart)
A dataset
variable
target (can have more than 2 levels)
Should plot be flipped? (change of x and y)
Title of the plot (if empty var name)
Display variable as numeric (not category)
Maximum number of categories to be plotted
Maximum number of categories to be plotted for target (except NA)
Color for bar
Position of the legend ("bottom"|"top"|"none")
Show labels? (if empty, automatic)
Size of labels
Further arguments