R Quick Reference
For Statistics, Data Analysis, and Reproducible Research
by Maruthy Pannala, PhD · 80 pages
PDF downloads for this title aren’t available yet — you can read it in full above.
About This Book
R Quick Reference is a working desk reference, not a course. It assumes you already know what a mean and a standard deviation are, and gets straight to the R syntax you need to compute them, plot them, and reproduce the result six months later.
Ten chapters cover the R workflow a statistician, data scientist, student, or researcher reaches for daily: vectors and matrices in base R, data wrangling shown side by side in both base R and the tidyverse (dplyr/tidyr), reading and writing every common file format, fitting and sampling from probability distributions, running the standard battery of hypothesis tests, regression and econometrics, the core machine-learning workflow in base R, statistical graphics shown side by side in both base plotting and ggplot2, and the reproducibility habits -- sessionInfo(), error handling, environments -- that keep an analysis rerunnable. A one-page syntax appendix closes the book for the fastest possible lookup.
Every base-R code listing in this book has been run in a sandboxed R environment and its output shown exactly as produced. Listings that depend on CRAN packages (dplyr, tidyr, ggplot2, and similar) are marked accordingly and were verified by hand rather than executed in that sandbox -- if your own output differs, something in your environment differs too, and that is worth tracking down before moving on.
Table of Contents
- 1R Essentials for Statistical Computing
- 2Vectors, Matrices & Numerical Computing
- 3Data Wrangling: data.frame, dplyr & tidyr
- 4Reading, Writing & Connecting to Data
- 5Probability Distributions in Base R
- 6Statistical Inference & Hypothesis Testing
- 7Regression & Econometrics
- 8Machine Learning Essentials
- 9Statistical Graphics: Base Plotting & ggplot2
- 10Reproducibility, Environments & Debugging
- Appendix A: One-Page Syntax Quick Reference