The new (5th) edition is available now, both as an eText or as a rental book!

The Art & Science of Learning from Data

The Art & Science of Learning from DataThe Art & Science of Learning from DataThe Art & Science of Learning from Data
Home
Web Apps
Mobile Apps
Datasets
R Code
YouTube
Errata

The Art & Science of Learning from Data

The Art & Science of Learning from DataThe Art & Science of Learning from DataThe Art & Science of Learning from Data
Home
Web Apps
Mobile Apps
Datasets
R Code
YouTube
Errata
More
  • Home
  • Web Apps
  • Mobile Apps
  • Datasets
  • R Code
  • YouTube
  • Errata

  • Home
  • Web Apps
  • Mobile Apps
  • Datasets
  • R Code
  • YouTube
  • Errata
Art of Stat

R Code

The new edition contains R code to replicate almost all analysis shown in the book. You can find the commented R-code at the end of each chapter, in the Chapter Summary pages. Below, you can view and download the R code instructions.

R Code by Chapter

See below for chapter by chapter R code

Download PDF

R Code by Chapter

This site will eventually show R files using both basic R and the tidyverse to replicate the statistical analysis from examples appearing throughout the book. 

Chapter 1

  • Example 5: Google Analytics - Loading a .csv data file into R: Annotated PDF, Raw R-Code​

Chapter 2

  • Example 2: Shark Attacks - Proportions and Percentages: Annoted PDF, R-Code
  • Example 3: U.S. Shark Attacks - Pie Charts and Bar Charts: Annotated PDF, Raw R-Code
  • Example 4: Sodium Content of Cereals - Dotplots: Annotated PDF, Raw R-Code
  • Example 5: Sodium Content of Cereals - Stem & Leaf Plot: Annotated PDF, Raw R-Code
  • Example 6: TV Hours per Day - Histogram: Annotated PDF, Raw R-Code
  • Example 7: Sodium Content of Cereals - Histogram: Annotated PDF, Raw R-Code
  • Example 9: Warming Trends in New York City - Time Trend: Annotated PDF, Raw R-Code
  • Example 10: Sodium Content - Mean & Median: Annotated PDF, Raw 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: Annotated PDF, Raw R-Code

Chapters 3 -15

UNDER CONSTRUCTION!

 Copyright © 2022 Bernhard Klingenberg - All Rights Reserved. 


This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data and solely be used to analyze website traffic.

DeclineAccept