Skip to content

Instantly share code, notes, and snippets.

@quantixed
Created June 10, 2020 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantixed/42625f988a7b5da25b7e333c4a660b97 to your computer and use it in GitHub Desktop.
Save quantixed/42625f988a7b5da25b7e333c4a660b97 to your computer and use it in GitHub Desktop.
Preferred directory structure for R projects
## Setup preferred directory structure in wd
ifelse(!dir.exists("Data"), dir.create("Data"), "Folder exists already")
ifelse(!dir.exists("Output"), dir.create("Output"), "Folder exists already")
ifelse(!dir.exists("Output/Data"), dir.create("Output/Data"), "Folder exists already")
ifelse(!dir.exists("Output/Plots"), dir.create("Output/Plots"), "Folder exists already")
ifelse(!dir.exists("Script"), dir.create("Script"), "Folder exists already")
@quantixed
Copy link
Author

For bash/zsh:

mkdir Data;\
mkdir Output;\
mkdir Output/Data;\
mkdir Output/Plots;\
mkdir Script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment