On Wed, 25 Jul 2018, MacQueen, Don wrote:

From my perspective, which is a unix-alike perspective, Rscript makes R
useable in exactly the same way as other unix style scripting languages
such as perl, tcsh, bash, etc. This is useful, and a good thing. If I
remember (and understood) correctly, it is why Rscript was introduced,
later in R's history than BATCH.

Don,

  As a linux-only user for more than two decades I really appreciate the
value of running scripts from the command line. For a current project, after
extracting 29 years of data from PDF forms I ran them through a bash shell
script (passing the name of the source file as $1) that calls two sed and
six awk scripts. The output is ready to be read into R.

If I want to pass custom parameters to the script (script-specific
parameters of my own that I put on the command line), the syntax for
either supplying them or parsing them might be different. I'm not sure,
since I don't do this very often, and never use CMD BATCH. But it would be
worth checking.

  This is what I need to work out now for Rscript: how to set positional or
named parameters on the command line with the source file name and the R
data.frame name.

  Thanks for your comments.

Best regards,

Rich

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to