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-r6class
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]]
___
Dear R gurus,
I am trying to overload some operators in order to let these work with the
ff package by registering the S3 objects from the ff package and
overloading the operators as shown below in a reproducible example where
the "*" operator is overloaded.
require(ff)
setOldClass(Classes=c("ff_
Thanks!
On Wed, Mar 24, 2010 at 1:01 AM, Sharpie wrote:
>
>
> Chidambaram Annamalai wrote:
> >
> > Hi,
> >
> > I need some help to get some of the object orientation, specifically the
> > methods that overload the basic arithmetic operations, from sample C++
> > code to R. I don't have experien
Chidambaram Annamalai wrote:
>
> Hi,
>
> I need some help to get some of the object orientation, specifically the
> methods that overload the basic arithmetic operations, from sample C++
> code to R. I don't have experience with such advanced language features
> inside of R. So I was wondering
Hi,
I need some help to get some of the object orientation, specifically the
methods that overload the basic arithmetic operations, from sample C++
code to R. I don't have experience with such advanced language features
inside of R. So I was wondering if some of you could help me out in this
regar
The 'polynom' package provides one example of how to do this.
However, getAnywhere("+.polynomial") just told me "no object named
‘+.polynomial’ was found"; I don't know why. The documentation says it
uses S3 classes. The 'Matrix' package should provide other examples,
using S4 classes.
hadley wickham wrote:
> On Thu, Jul 10, 2008 at 5:09 AM, Peter Dalgaard
> <[EMAIL PROTECTED]> wrote:
>
>> Tine wrote:
>>
>>> Hi!
>>>
>>> I was just wondering is there anyway to overload operator for custom
>>> class.
>>> For example:
>>> I have two matrices A and B with same dimensions. I w
On Thu, Jul 10, 2008 at 5:09 AM, Peter Dalgaard
<[EMAIL PROTECTED]> wrote:
> Tine wrote:
>> Hi!
>>
>> I was just wondering is there anyway to overload operator for custom
>> class.
>> For example:
>> I have two matrices A and B with same dimensions. I want to overload
>> operator '+' with my own fu
Tine wrote:
> Hi!
>
> I was just wondering is there anyway to overload operator for custom
> class.
> For example:
> I have two matrices A and B with same dimensions. I want to overload
> operator '+' with my own function.
> Or even better can I create my own (new) operator.
> Example:
> A+-B where
Hi!
I was just wondering is there anyway to overload operator for custom class.
For example:
I have two matrices A and B with same dimensions. I want to overload
operator '+' with my own function.
Or even better can I create my own (new) operator.
Example:
A+-B where '+-' would be some function
11 matches
Mail list logo