Make sure that Tools -> Global Options -> General -> Save workspace to ~/.RData on exit is set to the default Ask

Introduction to Reproducibility

Make sure things you did before don’t matter

  • Start new project
  • Create data subdirectory
  • Use Right Click -> Save Link As to download Portal surveys & species data
data_mammals <- read.csv('data/surveys.csv')
avg_mass <- mean(data_mammals$weight, rm.na = TRUE)
data_surveys <- read.csv('data/surveys.csv')
avg_mass <- mean(data_mammals$weight, rm.na = TRUE)
data_species <- read.csv('data/species.csv')

Make sure code works on other computers

Use print to show things you want the program to show

Clean up extra code

Checklist