That is a very handy tip, commandArgs(trailingOnly=T), thanks!
On Fri, Nov 12, 2010 at 1:09 PM, Anthony Ferrari <email@example.com
> OK. I have made some tests this morning to figure this all out.
> Indeed, the problem with ">" is that it catches every single message R sends
> to STDOUT and not only object of your interest, so this is definitely not a
> reliable solution. Solution suggests by Alex worked perfectly well.
> I would suggest also to use the 'trailingOnly=TRUE' option within the
> commandArgs() call in the R script. That allows you to only care about the
> args given after the '--args' option. You can then forget how many previous
> options you have in your command line (--vanilla, --slave, -f or others...).
> First parameter useful to your R script would then be
> commandArgs(trailingOnly=T) and so on.