in reply to Passing parameters to R script

Have you looked at Statistics::R?