[R] How to Read command line parameters in Sweave?

Manish Gupta mandecent.gupta at gmail.com
Thu Jun 7 09:30:13 CEST 2012


Hi,

I followed the link u provided but getting some error.

R -e "Sweave('MyReport.Rnw')" --args PatientId=1

i am keeping commandArgs(TRUE) in my Rnw file. print(PatientId) // Error:
chunk 2 Error in print(PatientId) : object 'PatientId' not found Execution
halted


Any working example will help me a lot.

--
View this message in context: http://r.789695.n4.nabble.com/How-to-Read-command-line-parameters-in-Sweave-tp4632493p4632644.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list