[R] writing R shell scripts?

Deepak Chandra dchandra at ics.uci.edu
Wed Jan 24 04:31:27 CET 2007


Hi All,

Another newbie question. I want to write an R script that takes
argument from command line and runs and produces output to stdin.

For example if there is file foo.R with following in it.

args = commandArgs()
print(args)

then, when I run it like
 $ R foo.R hello
it should print 'hello' on the terminal.

I searched the mainling list and found a very old post that said said
that this feature will be implemented soon. I am expecting this has
already  been implemented by now.

Thanks,
Deepak



More information about the R-help mailing list