The median of an observation variable is the value at the middle when the data is sorted in ascending order. It is an ordinal measure of the central location of the data values.
Find the median of the eruption duration in the data set faithful.
We apply the median function to compute the median value of eruptions.
> median(duration) # apply the median function
The median of the eruption duration is 4 minutes.
Find the median of the eruption waiting periods in faithful.