[R] command option for R CMD BATCH

Patrick Connolly p_connolly at ihug.co.nz
Fri Nov 24 06:52:38 CET 2006


On Thu, 23-Nov-2006 at 02:44PM +0000, Prof Brian Ripley wrote:

|> Try this:
|> 
|> gannet% cat month.R
|> x <- commandArgs()
|> print(x[length(x)])
|> 
|> gannet% R --slave --args January < month.R
|> [1] "January"

That's exactly what I needed.  Thank you Brian for a concise and
thorough answer.



-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}          		 Great minds discuss ideas    
 _( Y )_  	  	        Middle minds discuss events 
(:_~*~_:) 	       		 Small minds discuss people  
 (_)-(_)  	                           ..... Anon
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the R-help mailing list