[R] reading file names for R batch process

Thomas Lumley tlumley at u.washington.edu
Thu Dec 6 17:37:21 CET 2001


On Thu, 6 Dec 2001, Sven Garbade wrote:

> Prof Brian D Ripley wrote:
> >
> > On Thu, 6 Dec 2001, Sven Garbade wrote:
> >
> > > Hi all,
> > >
> > > I've written a function that takes several filenames as arguments, does
> > > some calculations and write new files. Now I want to write a shell
> > > script (under Linux) that determines the files for the R process and
> > > starts R with the filenames as arguments. But how can I commit the
> > > filenames to the R process?
> >
> > via enviroment variables, most easily.
> >
> > Read by Sys.getenv.
>
> Ah, this is very easy and works! Thanks, Sven

I believe you could also use the commandArgs() function.

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list