Increasing your efficiency with reproducible workflows in R
What makes an Intermediate R
user? This course is most relevant and targeted at folks who:
R
and want improve their efficiency and skill set{dplyr}
, {ggplot2}
, {sf}
, and {rmarkdown}
R
R
?R
is an open-source language for statistical computing and a general purpose programming language. It is one of the primary languages used for data science, modeling, and visualization.
In this course, we will move more quickly, assume familiarity with basic R
skills, and also assume that the participant has working experience with more complex workflows, operations, and code-bases. Each module in this course functions as a “stand-alone” lesson, and can be read linearly, or out of order according to your needs and interests. Each module doesn’t necessarily require familiarity with the previous module.
This course emphasizes:
Figure 1: Artwork by @allison_horst
Course Modules
All data used in this course is expected to live in a /data
subfolder in a project directory.
We will be working in an R project using RStudio. If you’ve already downloaded zipped data and Rproj file from the introductory course setup, you’re already set and can move on to the modules.
If you want to set up your own new RStudio project (highly recommend for experience!), we can create a new project file (intermediate_r4wrds.Rproj
), in a few different ways. Directly from RStudio (detailed in the introductory project management module), or via the command line. We can use touch intermediate_r4wrds.Rproj
(MacOS/Linux) or echo > intermediate_r4wrds.Rproj
(Windows) in the root project directory.
To complete code exercises and follow along in the course, you will create a /data
subfolder, and a /scripts
subfolder to store .R
scripts, which we recommend naming by module.
Your project directory structure should look like this (note the position of the /data
subfolder):
.
├── scripts
│ ├── module_01.R
│ └── module_02.R
│ └── ...
├── data
│ ├── gwl.csv
│ └── polygon.shp
│ └── ...
└── intermediate_r4wrds.Rproj
Once an RStudio project has been created we can download the data in in a few ways:
# downloads the data.zip file to the `data` directory
dir.create("data")
download.file("https://github.com/r4wrds/r4wrds-data/raw/main/data.zip", destfile = "data/data.zip")
# unzip the data:
unzip(zipfile = "data/data.zip")
# if get resulting __MACOSX folder (artifact of unzip), remove:
unlink("__MACOSX", recursive = TRUE)
Once data have been downloaded and moved to a data folder, or downloaded directly into the project, we are ready to roll!
We will follow the SFS Code of Conduct throughout our workshop.
All source materials for this website can be accessed at the r4wrds
Github repository.
Content in these lessons has been modified and/or adapted from Data Carpentry: R
for data analysis and visualization of Ecological Data, the USGS-R training curriculum here, the NCEAS Open Science for Synthesis workshop here, Mapping in R
, and the wonderful text R
for data science.
site last updated: 2025-05-12 10:45
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/r4wrds/r4wrds, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".