Skip to content
Prev 33805 / 63424 Next

How to ship R scripts with R packages ?

Romain Francois wrote:
I think exec is a reasonable place to put the script.  If you don't want 
to type that long command above, why not put it in a small function in 
the package?  E.g. define

antR <- function() cat( system.file( 'exec', 'ant.R', package = 'ant' ) )

then you can run it with
 
Rscript -e "ant::antR()"

Duncan Murdoch