Dear R users, writing an R package I wonder, if there is a place to put executable R scripts into. So that when the package is installed one can use the script from the command line. Say we have e new package called FunkyR and wanted to deliver with it an executable called FunkyCold.R, so that from the command line, one could do the following: Rscript FunkyCold.R argument_1 argument_2 Any hints or suggestions? Kind regards!
Is there a place to put executable R scripts in new packages?
3 messages · Asis Hallab, Duncan Murdoch, Greg Snow
On 13-02-12 11:09 PM, Asis Hallab wrote:
Dear R users, writing an R package I wonder, if there is a place to put executable R scripts into. So that when the package is installed one can use the script from the command line. Say we have e new package called FunkyR and wanted to deliver with it an executable called FunkyCold.R, so that from the command line, one could do the following: Rscript FunkyCold.R argument_1 argument_2 Any hints or suggestions?
It's probably possible to achieve what you're asking for, but it would be messy and ugly. A better approach is to write a function corresponding to each script, then call it as Rscript -e "mypkg::FunkyCold(arg1, arg2)" Duncan Murdoch
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130213/3849bacd/attachment.pl>