[R] passing a variable at the command line

Dirk Eddelbuettel edd at debian.org
Wed Jul 2 02:30:14 CEST 2008


On 1 July 2008 at 18:49, Erin Hodgess wrote:
| I have used
| 
| ./R --no-save -q -f e.in >stuff.out
| 
| with great success on SUSE10.1 with R-2.7.1.
| 
| My question is, please:  is there a way to pass in a variable to the
| e.in file?  I'm fairly sure that the answer is no, but thought I'd
| double check.

Start with 

	help(commandArgs)

but as Seb said, you probably want Rscript or littler.

Dirk

-- 
Three out of two people have difficulties with fractions.



More information about the R-help mailing list