, R, commandArgs(), , , R CMD Sweave . Sweave R -e,
R -e "Sweave('MyReport.Rnw')" --args PatientId=1
MyReport.Rnw commandArgs(TRUE), PatientId=1.
, Sweave() R script ; script
PatientId <- 1
Sweave("MyReport.Rnw")
MyReport.Rnw PatientId. , PatientId.