Thomas Goossens
Quickly create your R project directory tree with pre-filled common files
Each time you start a new R project, it is highly recommanded to prepare a clean and organized working directory
If you regularly create new projects, this working directory preparation task might seem tedious and time consuming. Creating the folders, intializing git, creating a license file, a readme file, etc.
Instead of copying/pasting an existing pristine directory tree, I propose you to use the power of linux bash scripting.
I’ve built a little script, inspired from frdvnw, that will allow you to quickly create a new R project directory tree along with all its commonly required files.
So, what does the script actually do ?
- It pulls the Github R .gitgnore template file and make it your .gitignore file
- It pulls the GNU GPL V3 license from gnu.org and make it your LICENSE file
- It pulls a default init.R script from its repo. This init.R file contains a YAML header + Terms of Services footer + my habitual R script initialization functions (load common libraries, etc…)
- It creates the tree structure (data folder, output folder, img fodlers, etc)
- It intialize a new git repository and make a first commit for you ;)
If you want to give it a try, head at its repo, fork/clone and play it !