[R] passing args to R CMD BATCH in win 2000

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Aug 2 13:09:05 CEST 2007



Stephen.Bond at ohrc.on.ca wrote:
> Hello and sorry to bother.
> 
> Please help.
> I searched the archives but could not find out why --args is being ignored 
> on Windows 2000.


That does not work with R CMD BATCH, AFAIK. In fact, you want to use:

Rterm --no-save --args "12" < 11.R > 11.Rout

Uwe Ligges



> I try
> 
> R CMD BATCH --slave 11.R 11.Rout --args "12"
> 
> and 11.R has
> 
> x=commandArgs(trail=T)
> print(x)
> a=x[length(x)]
> write.csv(a,file="13.out")
> q("no")
> 
> 
> the argument is not passed to the R process.
> 11.Rout only shows processing time and 13.out does not have the value.
> 
> 
> Thank you all.
> stephen
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> 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.



More information about the R-help mailing list