Can R CMD check run examples/tests in parallel (on Windows)?
R CMD check takes a significant amount of time to complete on one of my pa开发者_开发知识库ckages because there are many examples/tests to run. Perhaps there's a way to run in parallel?
I stumbled upon this post which seems to have a solution for R CMD install on linux (I can't see how it would work on Windows): http://r.789695.n4.nabble.com/parallel-build-for-package-equivalent-of-make-j8-td921920.html
Is there a solution for parallel R CMD check on Windows?
It's a hack, but you could take the tests out of the tests
directory and put them somewhere else that they won't get run automatically (e.g. inst/tests
), then use your own, parallelizable, framework (e.g. make
run in parallel: http://dannythorpe.com/2008/03/06/parallel-make-in-win32/ may be relevant) to run the tests ... this won't help for examples, though.
A completely different approach would be to use the cacheSweave package, which caches the unchanging parts of your code from run-to-run. If you are tweaking some code but most of it is unchanged, this could save a lot of time. If plots are what's slowing things down however, cacheSweave won't help much (as explained in the vignette).
精彩评论