On 3 January 2018 at 08:36, Jeff Newmiller <jdnew...@dcn.davis.ca.us> wrote: > Function arguments are not pass-by-reference... they are pass-by-value. You > need to return the altered object to the caller when you are done messing > with it.
Thanks. Of course. Now it is working. > Note that R is a data processing language... your example will not scale to > real world use cases because you make no use of vectorization to handle > multiple accounts. > It is better to focus on the functional aspect of computing and let the > objects carry the results until you have a chance to summarize or plot them. > Study the "lm" function and associated print and plot methods. Thanks for these suggestions. It is very helpful. Regards Martin ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.