Re: [R] How to define new operators

2009-12-18 Thread Duncan Murdoch
On 18/12/2009 10:22 AM, berga...@gmail.com wrote: Dear R community I try to create a new operator to build a special sum of two CashFlows. (my S4 Class) I tried the following but this is actually not what I want. setGeneric("++",function(e1,e2)standardGeneric("++")) setMethod("+",signature

[R] How to define new operators

2009-12-18 Thread bergarog
Dear R community I try to create a new operator to build a special sum of two CashFlows. (my S4 Class) I tried the following but this is actually not what I want. setGeneric("++",function(e1,e2)standardGeneric("++")) setMethod("+",signature=list("CashFlow","CashFlow"),function(e1,e2){ print("