6.5 Stem and Leaf plots

?stem()
# ?stem()
x <- c( 1,1,2,3,5,8,13 )
stem(x, 
     scale = 2, 
     width = 10, atom = 1e-08)
## 
##   The decimal point is at the |
## 
##    0 | 
##    2 | 
##    4 | 
##    6 | 
##    8 | 
##   10 | 
##   12 |
islands_df <- data_frame(values=islands,islands=names(islands))
## Warning: `data_frame()` was deprecated in tibble 1.1.0.
## ℹ Please use `tibble()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
islands_df%>%
  ggplot(aes(values))+
  geom_histogram()+
  coord_flip()+
  scale_x_reverse()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

stem(islands)
## 
##   The decimal point is 3 digit(s) to the right of the |
## 
##    0 | 00000000000000000000000000000111111222338
##    2 | 07
##    4 | 5
##    6 | 8
##    8 | 4
##   10 | 5
##   12 | 
##   14 | 
##   16 | 0
stem(log10(islands))
## 
##   The decimal point is at the |
## 
##   1 | 1111112222233444
##   1 | 5555556666667899999
##   2 | 3344
##   2 | 59
##   3 | 
##   3 | 5678
##   4 | 012
stem( afl.margins )
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##    0 | 001111223333333344567788888999999
##    1 | 0000011122234456666899999
##    2 | 00011222333445566667788999999
##    3 | 01223555566666678888899
##    4 | 012334444477788899
##    5 | 00002233445556667
##    6 | 0113455678
##    7 | 01123556
##    8 | 122349
##    9 | 458
##   10 | 148
##   11 | 6