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. ______________________________________________ R-help@r-project.org 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.