passing parameters to an R script
On Sat, Jan 3, 2009 at 7:32 PM, <mauede at alice.it> wrote:
I knowf R functions ca be called passing some parameters. My first question is: how are parameters passed to R functions ? Browsing through R archives I found an answer confirming taht parameters can be passed to the called function by value. I wonder whether passing the parameter address is possible somehow to allow the function to actually change its value.
See for instance the R.oo package (on CRAN). That will allow you to emulate pass by reference of R objects (using R environments).
My second question is about running R scripts with parameters. Something similar to the s/w device (argc, argv) which is used to run a C program with initial parameters. Is this possible at all ?
See help(commandArgs). /Henrik
Thank you very much.
Maura
tutti i telefonini TIM!
[[alternative HTML version deleted]]
______________________________________________ R-help at 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.