June 2016
Beginner to intermediate
1783 pages
71h 22m
English
In this recipe, you will learn how to make box plots that are useful in comparing the spread of values in different measurements.
First, we need to load the metals.csv example data file that contains measurements of metal concentrations in London's air (you can download this file from the code download section of the book's companion website):
metals<-read.csv("metals.csv",header=TRUE)We can make a box plot to summarize the metal concentration data using the boxplot() command as follows:
boxplot(metals, xlab="Metals", ylab="Atmospheric Concentration in ng per cubic metre", main="Atmospheric Metal Concentrations in London")
The main argument, the boxplot() function, takes a set of numeric ...
Read now
Unlock full access