- To obtain the minimum, maximum, median, and quartiles of variable y use summary(y)
- max(y) gives the maximum value of variable y
min(y) gives the minimum of variable y - so (max(y) + min(y)) / 2 gives their mean.
- For these data the midrange is rather larger than the median because variable y is somewhat left skewed.
Notice also that, whilst it may not be very difficult to calculate the mode, this is seldom done because it is so dependent upon rounding, truncation, or what interval you consider to be appropriate. In practice the mode is nearly always estimated by eye from a graph - in other words, when calculated from real data, its location is subjective and arbitrary.