powered by
This function generates boxplots grouped by a specified class label from a data frame containing numeric values using ggplot2.
plot_boxplot_class( data, class_label, label_x = "", label_y = "", colors = NULL )
returns a ggplot graphic
data.frame contain x, value, and variable
name of attribute for class label
x-axis label
y-axis label
color vector
grf <- plot_boxplot_class(iris |> dplyr::select(Sepal.Width, Species), class = "Species", colors=c("red", "green", "blue")) plot(grf)
Run the code above in your browser using DataLab