Load Table 8 from Section 3.2 into R. Recall, Table 8 from Section 3.2 is Table 1 from Section 3.1.
Table8 <- read.csv("https://sullystats.github.io/Stats7e/Data/Ch3/Table1.csv")
## If using Stats 6e:
## Table8 <- read.csv("https://sullystats.github.io/Statistics6e/Data/Chapter3/Table1.csv")
head(Table8,n=5)
## Score
## 1 82
## 2 77
## 3 90
## 4 71
## 5 62
In R, use the range function returns the minimum and maximum value in a data frame.
range(Table8)
## [1] 62 94
The minimum value is 62 and the maximum value is 94.
To find the range (that is, the difference between the maximum and minimum value), use the diff function.
diff(range(Table8))
## [1] 32
The range is 94 - 62 = 32.