The loop that echoes the arguments almost always stops too soon. It apparently
does that to avoid
echoing the "--args" (that had been inserted) when there are no user arguments.
However, when there
are user arguments, the next element of the 'av' array is the last argument and
usually not "--args",
although it can be.
?Rscript is a little sketchy:
‘--verbose’ gives details of what ‘Rscript’ is doing. Also passed
on to R.
What is passed to R is correct, but the diagnostic is not:
$ Rscript --verbose /dev/null 1 2
running
'/path_to_R --slave --no-restore --file=/dev/null --args 1'
Fixed (only tested on Mac):
$ Rscript --verbose /dev/null 1 2
running
'/Library/Frameworks/R.framework/Versions/3.1/Resources/bin/R --slave
--no-restore --file=/dev/null --args 1 2'
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel