| grouped_barplot | R Documentation |
Creates a grouped barplot.
grouped_barplot(
data,
x_var,
y_var,
rm_ids = NULL,
fill = NULL,
alpha = 1,
lwd = 1,
line_color = "black",
x_title = NULL,
y_title = NULL,
legend_title = NULL,
use_na = c("ifany", "never", "always"),
use_proportions = F
)
data |
A data frame with columns from which to retrieve variables to plot. |
x_var |
A string denoting the column name of the primary barplot variable. |
y_var |
A string denoting the column name of the secondary barplot variable. |
rm_ids |
A string vector of the row names to exclude prior to plotting. |
fill |
A string denoting the line color for barplot bars. |
alpha |
A numeric value for the alpha level for barplot bars. |
lwd |
A numeric value for the barplot bar line width. |
x_title |
A string denoting the x-axis title. |
y_title |
A string denoting the y-axis title. |
legend_title |
A string denoting the legend title. Should correspond to |
use_na |
One of "never", "ifany", or "always" to denote whether NA values should be included in the frequency calculations. |
use_proportions |
A boolean denoting if proportions should be used instead of frequencies. |
Creates a barplot for frequencies of two factor variables in which one variable is used to stratify the other.
A ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.