Using Base R

Load Table 17.

Table17 <- read.csv("https://sullystats.github.io/Statistics6e/Data/Chapter3/Table17.csv")
head(Table17,n=4)
##    Time
## 1 19.95
## 2 28.58
## 3 33.23
## 4 23.25

Now, use the boxplot( ) command.

boxplot(Table17$Time, horizontal = TRUE, main = "Five Kilometer Race for 60 - 64 Year Olds", xlab = "Finishing Time (in seconds)", col = "#6897bb")

Or, manually enter the data using the c( ) command.

Table17a <- c(19.95, 23.25, 23.32, 25.55, 25.83, 26.28, 28.58, 28.72, 30.18, 30.35, 30.95, 32.13, 33.23, 33.53, 36.68, 37.05, 37.43, 41.42, 42.47, 49.17, 54.63)
boxplot(Table17a, horizontal = TRUE, main = "Five Kilometer Race for 60 - 64 Year Olds", xlab = "Finishing Time (in seconds)", col = "#6897bb")

Using Mosaic

Load Table 17.

Table17 <- read.csv("https://sullystats.github.io/Statistics6e/Data/Chapter3/Table17.csv")
head(Table17,n=4)
##    Time
## 1 19.95
## 2 28.58
## 3 33.23
## 4 23.25

As always, Mosaic uses the syntax:

function(~ variable, data = df_name)

The command for a horizontal boxplot in Mosaic is bwplot( ).

library(mosaic)
bwplot(~Time,data=Table17,col="black",fill="#6897bb",main="Five Kilometer Race for 60 - 64 Year Olds",xlab="Finishing Time (in seconds)")