Operator Overloading in R

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Operator Overloading in R

Mahnoor Malik
I am using R6 class and I have to do operator overloading (+ ,-,*) for a
custom data type . What will be the necessary steps ? I am totally confused
as to what should I do in order to implement this .

Thanks

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Operator Overloading in R

Eric Berger
I have experience with R6 classes but I have not used operator overloading
with them.
Out of curiosity I did a quick search and found this link which provides a
step by step (I am not claiming it is the only way)
https://stackoverflow.com/questions/49463235/arithmetic-operators-overload-for-r6classes-in-r

HTH,
Eric


On Wed, Jan 16, 2019 at 4:01 PM Mahnoor Malik <[hidden email]> wrote:

> I am using R6 class and I have to do operator overloading (+ ,-,*) for a
> custom data type . What will be the necessary steps ? I am totally confused
> as to what should I do in order to implement this .
>
> Thanks
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.