Project workflow

Outline

  1. Set up R and R studio
  2. Install and set up a version control software
  3. Set up an online version control account
  4. Project folder structure
  5. File naming system

1. Set up R and R studio

1. Set up R and R studio

From Wickham and Grolemund, 2017

From Wickham and Grolemund, 2017

2. Install and set up a version control software

3. Set up an online version control account

3. Join our classroom github repository

3. Download and configure git on your machines

3. Download and configure git on your machines

  • Open shell from Rstudio. Tools > Shell
  • Configure git with your name and email address
git config --global user.name "Your Name"
git config --global user.email your.email@domain.com

4. Project folder structure

Let's discuss!

  1. Is the code reproducible?
  2. How would you improve the code?
  3. Are the files names informative?

Working directory and portable code

Absolute path

"C:/project_root_folder/data/species_dat.csv"

Relative path

"data/species_dat.csv"

RStudio projects

Project folder structure (some tips)

  • Separate your code into pipeline chunks
From Joseph V. Casillas, 2015

From Joseph V. Casillas, 2015

  • Comment your data and code
  • Separate temporal working data from raw data

5. File naming system