Helper function: plot grouped bar chart
.plot_bars(
data,
category = NULL,
ci = FALSE,
scale = 0,
limits = NULL,
numbers_col = NULL,
orientation = "horizontal",
base = NULL,
title = NULL
)A ggplot object.
Data frame with the columns item, value, p, n and optionally w If w is provided, the column width is generated according the w value, resulting in a mosaic plot.
Optionally, a category to focus. All rows not matching the category will be filtered out.
Whether to plot error bars for 95% confidence intervals. Provide the columns ci.low and ci.high in data.
Direction of the scale: 0 = no direction for categories, -1 = descending or 1 = ascending values.
Name of the column containing values to plot on the bars.
Whether to show bars (horizontal) or columns (vertical)
The plot base as character or NULL.
The plot title as character or NULL.