Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R CMD build - possible from within R?

Tags:

r

Is it possible to build packages from within R instead of from the command line calling R? I looked at ?build help file and also goggled but no luck. Maybe its not possible?

like image 407
SFun28 Avatar asked Oct 15 '25 15:10

SFun28


1 Answers

It has to be possible (but not necessarily easy). R CMD build used to be a Perl script, but it's been a pure R function for some time; I can't remember the exact version when the switch occurred.

I (again) urge you to search for answers via rseek.org (not Google) before asking here. The 6th hit for "R CMD build" is build.R from the svn repository. I bet you could take a look at that script and figure out how to build a package from R.

If that doesn't work, you can always issue a shell command from R: system("R CMD build myPackage.tar.gz").

like image 110
Joshua Ulrich Avatar answered Oct 18 '25 09:10

Joshua Ulrich