# R notes # ================================= # index to these notes # stem-and-leaf diagram, frequency distribution, box plot # ================================= # Rosner, chapter 2 # See: R Tutorial : Numerical Measures # http://www.r-tutor.com/elementary-statistics/numerical-measures # See: Quick-R : Descriptive Statistics # http://www.statmethods.net/stats/descriptives.html # ================================= # stem-and-leaf diagram # http://www.r-tutor.com/elementary-statistics/quantitative-data/stem-and-leaf-plot # http://www.gardenersown.co.uk/Education/Lectures/R/graphs2.htm duration = faithful\$eruptions stem(duration) # ================================= # frequency distribution # http://www.r-tutor.com/elementary-statistics/qualitative-data/frequency-distribution-qualitative-data # http://www.r-tutor.com/elementary-statistics/quantitative-data/cumulative-relative-frequency-distribution duration <- faithful\$eruptions breaks <- seq(1.5, 5.5, by=0.5) duration.cut <- cut(duration, breaks, right=FALSE) table(duration.cut) # ================================= # box plot # http://www.gardenersown.co.uk/Education/Lectures/R/graphs.htm#boxplot # http://www.statmethods.net/graphs/boxplot.html # http://msenux.redwoods.edu/math/R/boxplot.php # http://www.cyclismo.org/tutorial/R/plotting.html boxplot(duration, col="seagreen4") # =================================