Thank you. You're right. I come from C and C++ programming. I wonder whether to pass parameters to an R script I have to set environment variables ... ?
Best regards, Maura -----Messaggio originale----- Da: jim holtman [mailto:jholt...@gmail.com] Inviato: sab 03/01/2009 21.12 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch; r-help@r-project.org Oggetto: Re: [R] passing parameters to an R script No you can not pass an address to a function. If you want to change the value of something, then return it as a value and assign it to the object so you can see what is going on. Must be coming from the "C" environment where such things are allowed and lead to a number of problems. If you really have your heart set to do it, look at the '<<-' operator (or 'assign'), but use it with care. To retrieve environment values, use "Sys.getenv". On Sat, Jan 3, 2009 at 1:32 PM, <mau...@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. > > 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 ? > > Thank you very much. > Maura > > > > tutti i telefonini TIM! > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? tutti i telefonini TIM! [[alternative HTML version deleted]] ______________________________________________ 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.