However ironic it may be, we'll use the Iris data set as an example.
data(iris) stem(iris$Sepal.Length)
The decimal point is 1 digit (s) to the left of the |
42 | 0 44 | 0000 46 | 000000 48 | 00000000000 50 | 0000000000000000000 52 | 00000 54 | 0000000000000 56 | 00000000000000 58 | 0000000000 60 | 000000000000 62 | 0000000000000 64 | 000000000000 66 | 0000000000 68 | 0000000 70 | 00 72 | 0000 74 | 0 76 | 00000 78 | 0
This creates a plot for Sepal Length. Each line in the plot is a stem and each piece of information is a leaf. The decimal point is 1 digit to the left of the |, so 4.2 has 1 entry (4.20), and 4.4 has 4 entries (4.40, 4.40, 4.40, and 4.40). We can reduce the number of stems (or bins, in histogram terms), by changing the scale.
stem(iris$Sepal.Length, scale=.5)
The decimal point is at the |
4 | 3444 4 | 566667788888999999 5 | 000000000011111111122223444444 5 | 5555555666666777777778888888999 6 | 00000011111122223333333334444444 6 | 5555566777777778889999 7 | 0122234 7 | 677779
Now, the decimal point is at the |. So, we have 4.3, 4.4, 4.4, and 4.4 in the first bin. One of the 4.40s from the above example has been averaged with the 4.2 to create 4.3. This is actually what we see in the data:
iris$Sepal.Length[order(iris$Sepal.Length)]
[1] 4.3 4.4 4.4 4.4 4.5 ... ...
but to make equal intervals (42, 44, 46, 48, etc.) in the first example, the 4.3 became a 4.2 and 4.4.