R resources
Books
- R for Data Science: introductory textbook by RStudio’s Chief Scientist, Hadley Wickham
- Geocomputation with R: introductory textbook for geospatial analysis in R
- Spatial Data Science: more advanced textbook for geospatial analysis in R, with a heavier focus on methods
Courses
- DIME’s R for Stata Users: introduction to R language using common empirical research tasks. Requires some knowledge of coding (though not necessarily in Stata)
Community
- R for Data Science Slack: slack workspace for the R4DS community
- Tidy Tuesday: weekly R community activity to share data visualizations and the code to create them
Consultation materials
- List of R packages for difference-in-differences estimation: includes sample codes and links to package documentation and original paper
- RStudio cheatsheets
- RStudio IDE shortcuts and tips
- Tidyverse Style Guide
Sample code
- Demo for exporting tables
- Mostly harmless replication repository
- R main script example
- Regression tables
Useful packages
reprex
DeclareDesign
: suite of packages to simulate data, randomize treatment assignment and sampling, describe research design and conduct linear estimationsfixest
: functions to perform estimations with multiple fixed-effects- Comparison of R packages for Automated Exploratory Data Analysis