Re: [R] Rscript, hashbang, and arguments

2011-03-14 Thread Gene Leynes
This might be off base, but would using --args help? It means "ignore everything else, Mr. R executable". However you can still parse it within the R environment. I use something like this in my startup file (.site file): if("--args" %in% commandArgs()){ i=grep("--args", commandArgs())

[R] Rscript, hashbang, and arguments

2011-03-14 Thread Fong Chun Chan
Hi, I have a bunch of R scripts which have the hash bang !/usr/bin/env Rscript and I typically run these scripts by passing in some parameters like this: ./nameOfRScript arg1 arg2 ... I know Rscript has the option to run in --vanilla. Where exactly do I insert the --vanilla option? When I do s