boxplot.RdPlot a boxplot with the magma color scheme and an option to facet.
boxplot(df, x, y, facet = FALSE)Dataframe containing the variables for plotting
Column name of the categorical variable to view the distribution of
Column name containing the numerical variables to assign boxes to
Determines whether separate graphs will be created for each category
a ggplot object
penguins_data <- palmerpenguins::penguins
boxplot(penguins_data, species, flipper_length_mm, facet = TRUE)
#> Loading required package: viridisLite
#> Warning: package ‘rlang’ was built under R version 4.1.2
#>
#> Attaching package: ‘rlang’
#> The following objects are masked from ‘package:purrr’:
#>
#> %@%, as_function, flatten, flatten_chr, flatten_dbl, flatten_int,
#> flatten_lgl, flatten_raw, invoke, splice
#> Warning: Removed 2 rows containing non-finite values (stat_boxplot).