Here's an R package I'm working on for automatically setting up a project. I'm new to package development and so I'm not sure how you install it. It only contains one function called "scaf" that you can just copy and paste if easier.
There is a package devtools that contains a function install_github. You can use it something like:devtools::install_github("jmadin/scaf").
Excellent, looks like your scaffolding enforces a lot of good habits!
I love the idea but I am running into the following error:frowning:
Error in setwd(project_name) : cannot change working directory
In addition: Warning message:
running command 'mkdir test' had status 127
Hi Rene. This looks like a unix vs. Windows thing... it looks like the directory wasn't created using the unix command, and so you couldn't change the working directory. I guess I should take a look at how system commands work on Windows in R. Thanks for the homework! Cheers. Josh.
Hi Josh, Rene, Yes that is definitely a unix vs. Windows issue. Instead of making system calls, you could use the inbuilt R functions dir.create and writeLines to achieve the same results as mkdir and cat. Should work across platform too
Thanks, Dan. I'll look into it.