STATISTICS

THE ART & SCIENCE OF LEARNING FROM DATA

AGRESTI  ·  FRANKLIN  ·  KLINGENBERG

-For each Example, the PDF file shows the code and the correspoding R output. The raw R code is found in the R Code link as a text file. You can either copy and paste the content of this file directly into the R console or open and view it with an editor such as R Studio.

R Code to reproduce analysis in the text

  • Example 2: Shark Attacks - Proportions and Percentages: PDF   R-Code

  • Example 3: U.S. Shark Attacks - Pie Charts and Bar Charts: PDF   R-Code

  • Example 4: Sodium Content of Cereals - Dotplots: PDF   R-Code

  • Example 5: Sodium Content of Cereals - Stem & Leaf Plot: PDF   R-Code

  • Example 6: TV Hours per Day - Histogram: PDF   R-Code

  • Example 7: Sodium Content of Cereals - Histogram: PDF   R-Code

  • Example 9: Warming Trends in New York City - Time Trend: PDF   R-Code

  • Example 10: Sodium Content - Mean & Median: PDF   R-Code

  • Exercise 2.11: Using the Alligator Food Choice  to demonstrate creating basic frequency tables (count and percentages) and Barcharts, Pareto Charts and Pie Charts: PDF     R-Code

Chapter 2: