The range of an observation variable is the difference of its largest and smallest data values. It is a measure of how far apart the entire data spreads in value.
Find the range of the eruption duration in the data set faithful.
We apply the max and min function to compute the largest and smallest values of eruptions, then take the difference.
> max(duration) − min(duration) # apply the max and min functions
The range of the eruption duration is 3.5 minutes.
Find the range of the eruption waiting periods in faithful.