[Rd] Where to drop a python script?
marc_schwartz at me.com
Wed Oct 30 20:15:19 CET 2013
On Oct 30, 2013, at 1:54 PM, Jonathan Greenberg <jgrn at illinois.edu> wrote:
> I have a small python script that I'd like to include in an R package I'm
> developing, but I'm a bit unclear about which subfolder it should go in. R
> will be calling the script via a system() call. Thanks!
See Writing R Extensions Manual, section 1.1.7:
If you want to see a package example, my WriteXLS package uses Perl, but the concepts will be the same:
If you look at WriteXLS.R around line 130, you can see an example of getting the $PATH to the included Perl scripts that I use, which are in the 'inst/Perl' folder. Further down around line 230, is where the script is called via system(). Note the use of shQuote() for some arguments.
More information about the R-devel