Reputation: 3374
I am new to using makefiles in R, so excuse the really simple question: How do I execute a makefile which resides in a folder using R?
Is there a way to do so using a .R script? If so, what would the command line include?
Upvotes: 4
Views: 2078
Reputation: 3374
I found the following solution to my problem in calling make using R (assuming you use Windows and RStudio):
Turns out you first need to add Rtools to your PATH
Add the following to PATH:
After this is done, reopen your R console. Now you can use @yihui's servr package, and call a folder containing a makefile as follows:
servr::make(dir="path containing Makefile")
Hope this helps other newbies to makefile too...
Upvotes: 4