Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a pre-build script when building an R package

Tags:

package

r

cran

I have a package that uses both Rcpp and Roxygen2. I'd like to have R CMD build run a small prebuild script that runs compileAttributes() and and roxygenise() before it starting the build process. Is there a hook or mechanism to do this?

like image 332
James Howard Avatar asked May 18 '14 15:05

James Howard


1 Answers

As @mnel suggested, you could use a build script using devtools. Say a script named build.r:

library(devtools)
document()
compileAttributes()
someotherscript()
build()
like image 158
sebastian-c Avatar answered Nov 15 '22 19:11

sebastian-c