[R] understanding the FUNCTION function

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Thu Apr 26 20:44:47 CEST 2012


the solution is to write functions that return the data you want changed, and let the caller of the function decide where to put the answer. If you want to return multiple "answers", collect them in a vector  or list and return that.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

michaelyb <cel81009759 at gmail.com> wrote:

>Any solution for that type of problem?
>I did read the ?"<<-", and seems very similar to the "assign" function,
>if I
>am not mistaken....
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Using-FUNCTION-to-create-usable-objects-tp4588681p4590445.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>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.



More information about the R-help mailing list