Boxplots in Base R

This section introduces the functionality of the base-R function boxplot. Note that for some data formats, the plot function with x being a factor variable will also work.

R base box plots: boxplot()

Change main title and axis labels

# Change axis titles
# Change color (col = "gray") and remove frame
# Create notched box plot
boxplot(len ~ dose, data = ToothGrowth,
        main = "Plot of length by dose",
        xlab = "Dose (mg)", ylab = "Length",
        col = "lightgray", frame = FALSE)