powered by
Reads a data frame containing a grouping factor and a numerical variable and plots a series of violin graphs by the grouping factor.
prepare_by_group_violin_graph( df, by_var, var, order_by_mean = FALSE, group_on_y = TRUE, ... )
Data frame containing the grouping factor and the numerical variable to be plotted
a string containing the column name of the grouping factor
a string containing the column name of the numerical variable
a logical value indicating whether you want your violins to be ordered by group means (defaults to FALSE)
a logical value indicating whether you want your violins to be oriented horizontally (defaults to TRUE)
additional parameters that are passed to geom_violin
geom_violin
The plot as returned by ggplot2
ggplot2
# NOT RUN { data(russell_3000) df <- treat_outliers(russell_3000) prepare_by_group_violin_graph(df, "sector", "nioa") # }
Run the code above in your browser using DataLab