Choose Your Path
Where to begin with the workbook
You can use this workbook even if you have never written code. Choose the path below that best describes your experience.
If R Is New To You
Complete the Start Here pages in order:
- Set Up RStudio.
- Run Your First Script.
- Understanding EAMMi2.
- Begin Chapter 1.
The first chapters provide complete code and explain new commands when they first matter. Focus on understanding the purpose of each step. Memorization can come later through practice.
If You Have Used R Before
You may begin with Chapter 1 after you:
- download and unzip the starter files;
- open
exploring-statistics-r.Rprojin RStudio; and - run
scripts/00-open-and-check-data.Rto confirm that the data open correctly.
Review Run Your First Script if the project, script, or Console workflow differs from the way you usually work.
What Everyone Needs
Download the starter files. The folder includes:
exploring-statistics-r.Rproj, which opens the workbook project;data/EAMMi2-REDUCED.csv, which contains the teaching data;scripts/_setup.R, which prepares the R tools and data used by the chapter scripts;scripts/00-open-and-check-data.R, which checks the starter setup;- one R script for each workbook chapter; and
- survey documentation in the
resourcesfolder.
After unzipping the starter files, do not move the project file, data folder, or scripts folder away from one another. The chapter scripts use their locations inside this folder to find the data.
A Useful Learning Routine
When you reach a code example:
- Read the sentence above the code.
- Predict what the code should produce.
- Run the code in the chapter script.
- Find the result in RStudio.
- Check whether the result is reasonable.
- Explain what the result means for the research question.
Small mistakes are a normal part of learning R. The Troubleshooting page explains common messages and how to recover from them.