June 2016
Beginner to intermediate
1783 pages
71h 22m
English
In this recipe, we will learn how to make box plots with notches, which are useful in comparing the medians of different groups.
We will continue to use the metals.csv example dataset for this recipe. So, let's first load it:
metals<-read.csv("metals.csv")We shall now see how to make a box plot with notches:
boxplot(Cu ~ Source, data = metals, varwidth=TRUE,notch=TRUE, main="Summary of Copper concentrations by Site")

In the example, we set the notch argument to TRUE to create notches on each side of the boxes. If the notches of two plots do not overlap, then the medians are significantly ...
Read now
Unlock full access