[R] A couple of batch mode questions
bgunter@4567 @end|ng |rom gm@||@com
Wed Jul 25 22:27:16 CEST 2018
Eric may have more to say, but the straightforward answer is: use functions
to do what you want and pass any file specific info to them as parameters
of function calls.
If this seems arcane to you, then you have some homework to do, as using
functions is a (maybe the) central programming paradigm in R. Numerous
tutorials elaborate on this.
If I have misunderstood, my apologies, and just disregard.
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Jul 25, 2018 at 1:02 PM, Rich Shepard <rshepard using appl-ecosys.com>
> On Wed, 25 Jul 2018, Eric Berger wrote:
> You should be able to do all this within R. From what you have written I
>> don't see a compelling reason to use scripts at the shell level.
> The source() help page's last example calls a set of scripts to run
> sequentially. I assume this is used to run the same .R script on each file,
> with any file-specific variables used in each one. Perhaps I'm not seeing
> how to pass parameters to the script call with source() so that the same .R
> script can be automagically run for each imput file name. In my newness to
> this it appears Rscript allows running the same script substituting inpu
> file names based on arguments on the Rscript command line.
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posti
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help