[R] Help with first S3-class
Martin Møller Skarbiniks Pedersen
traxplayer at gmail.com
Wed Jan 3 13:11:17 CET 2018
On 3 January 2018 at 08:36, Jeff Newmiller <jdnewmil at 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.
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.
More information about the R-help