Draws faceted violin plots for multiple indicators, grouped by a grouping variable,
with each indicator in a separate facet
Usage
facet_violin(data, vars, groupby)
Arguments
- data
Data frame
- vars
Character vector, names of indicator variables to plot
- groupby
Character scalar, name of grouping variable
Details
This function will:
Select specified columns and convert to long format
Convert grouping variable to factor
Draw violin plots with boxplots inside, faceted by indicator
Examples
if (FALSE) { # \dontrun{
p <- facet_violin(iris, c("Sepal.Length", "Sepal.Width"), "Species")
print(p)
} # }