On 3 January 2018 at 00:52, Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
> On 02/01/2018 6:38 PM, Martin Møller Skarbiniks Pedersen wrote:
>>
>> Hi,
>>
>>    I am trying to understand S3 classes. I have read several tutorials
>> about
>> the topics but I am still a bit confused. I guess it is because it is
>> so different from
>> Java OOP.
>
>
> What you do below isn't S3.  S3 is a system where the classes are secondary
> to the generic functions.  Methods "belong" to generics, they don't belong
> to classes.  As far as I can see, you hardly make use of S3 methods and
> generics at all.
>
> For the style you're using, the R6 or R.oo packages might be more suitable.

OK. Thanks, I will rewrite the code.

I read the guide at https://www.programiz.com/r-programming/S3-class
to make the code.
And used the part under: 1.3.2. Local Environment Approach

There is a picture of Wickham and it is sponsored by Datacamp so I was
thinking it was a good place for a guide ?!

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.

Reply via email to