Preface
Hello, friend. This is yet another primer to get you started in R. I primarily created this to serve as a resource for students taking my courses at Princeton University. However, I’ve been told by others that they found it useful as both a primer and a quick reference. I’ve tried to make this primer as efficient as possible and provide the reader with what I consider to be the essentials. My experience is that the faster you can start using a statistical programming language such as R, the more likely you will appreciate its usefulness and continue to use it and learn. There isn’t a lot of discussion in this primer; it’s mostly examples in R.
The content of this document started with an undergraduate course I developed, called Introduction to Data Science. In that course, I made slides using the amazing R package revealjs
. I then developed Foundations of Applied Statistics and Data Science (with Applications in Biology), creating more advanced slides also using revealjs
; these slides can be found at https://jdstorey.org/asdscourse2017/lectures/, and the source code at https://github.com/jdstorey/asdslectures. Although I no longer use these slides to teach my courses, I was nevertheless able to easily use the R Markdown as a starting point for this primer, using the bookdown
package.
This primer is organized into three main parts:
- R basics and programming, including reproducible data analysis and R Markdown
-
Data wrangling, including
dplyr
-
Explortatory data analysis, including base graphics and
ggplot2
Source Files
The source files are maintained on GitHub: https://github.com/jdstorey/yarp
Feel free to visit this repository to help me make the book better.