| plot_boxplot_class | R Documentation |
Boxplots of a numeric column grouped by a class label.
plot_boxplot_class(
data,
class_label,
label_x = "",
label_y = "",
colors = NULL
)
data |
data.frame with a grouping column and one numeric column |
class_label |
name of the grouping (class) column |
label_x |
x‑axis label |
label_y |
y‑axis label |
colors |
optional fill color for the boxes |
Expects a data.frame with the grouping column named in class_label and one numeric column.
The function melts to long format and draws per‑group distributions.
returns a ggplot2::ggplot graphic
grf <- plot_boxplot_class(iris |> dplyr::select(Sepal.Width, Species),
class_label = "Species", colors=c("red", "green", "blue"))
plot(grf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.