jeff1evesque / ist-687

Syracuse IST687 final project with Jesse Warren (team member)
2 stars 0 forks source link

Conditionally set 'cwd' if running RStudio #53

Closed jeff1evesque closed 6 years ago

jeff1evesque commented 6 years ago

We need to conditionally define the cwd as follows:

## set project cwd: only execute in RStudio
if (nzchar(Sys.getenv('RSTUDIO_USER_IDENTITY'))) {
  cwd <- dirname(rstudioapi::getSourceEditorContext()$path)
  setwd(cwd)
}