Table of contents
- Part 1: R as a Tool — Introduction
- 1: Getting Started with R
- 2: The Basic Building Blocks in R
- 3: Advanced Data Structures in R
- 4: Reading Data into R
- 5: Making Statistical Graphs
- Learning objectives
- 5.1 Find the diamonds in the data
- 5.2 Make histograms with base graphics
- 5.3 Make scatterplots with base graphics
- 5.4 Make boxplots with base graphics
- 5.5 Get familiar with ggplot2
- 5.6 Plot histograms and densities with ggplot2
- 5.7 Make scatterplots with ggplot2
- 5.8 Make boxplots and violin plots with ggplot2
- 5.9 Make line plots
- 5.10 Create small multiples
- 5.11 Control colors and shapes
- 5.12 Add themes to graphs
- 5.13 Use Web graphics
- 6: Basics of Programming
- Learning objectives
- 6.1 Write the classic "Hello, World!" example
- 6.2 Understand the basics of function arguments
- 6.3 Return a value from a function
- 6.4 Gain flexibility with do.call
- 6.5 Use "if" statements to control program flow
- 6.6 Stagger "if" statements with "else"
- 6.7 Check multiple statements with switch
- 6.8 Run checks on entire vectors
- 6.9 Check compound statements
- 6.10 Iterate with a for loop
- 6.11 Iterate with a while loop
- 6.12 Control loops with break and next
- 7: Data Munging
- Learning objectives
- 7.1 Repeat an operation on a matrix using apply
- 7.2 Repeat an operation on a list
- 7.3 Apply a function over multiple lists with mapply
- 7.4 Perform group summaries with the aggregate function
- 7.5 Do group operations with the plyr Package
- 7.6 Combine datasets
- 7.7 Join datasets
- 7.8 Switch storage paradigms
- 7.9 Use tidyr
- 7.10 Get faster group operations
- 8: In-Depth with dplyr
- 9: Manipulating Strings
- 10: Reports and Slideshows with knitr
- Learning objectives
- 10.1 Understand the basics of LaTeX
- 10.2 Weave R code into LaTeX using knitr
- 10.3 Understand the basics of Markdown
- 10.4 Understand the basics of RMarkdown
- 10.5 Weave R code into Markdown using knitr
- 10.6 Convert Markdown files to Word
- 10.7 Convert Markdown to PDF
- 10.8 Create slideshows with RMarkdown
- 10.9 Write equations with RMarkdown
- 11: Include HTML Widgets in HTML Documents
- 12: Shiny
- 13: Package Building
- 14: Rcpp for Faster Code
- Part 1 - Summary
- Part 2: R for Statistics, Modeling and Machine Learning — Introduction
- 15: Basic Statistics
- 16: Linear Models
- Learning objectives
- 16.1 Fit simple linear models
- 16.2 Explore the data
- 16.3 Fit multiple regression models
- 16.4 Fit logistic regression
- 16.5 Fit Poisson regression
- 16.6 Analyze survival data
- 16.7 Assess model quality with residuals
- 16.8 Compare models
- 16.9 Judge accuracy using cross-validation
- 16.10 Estimate uncertainty with the bootstrap
- 16.11 Choose variables using stepwise selection
- 17: Other Models
- 18: Time Series
- 19: Clustering
- 20: More Machine Learning
- 21: Network Analysis
- 22: Automatic Parameter Tuning with Caret
- 23: Fit a Bayesian Model with RStan
- Part 2 - Summary
Part 1: R as a Tool — Introduction
Introduction