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_vector"))
setMethod(
f="*",
signature = signature(e1 = c("ff_vector"), e2 =
c("ff_vector")),
definition = function (e1, e2){
e1[] * e2[]
}
)
ff(1:10) * ff(1:10)
It looks like the ff(1:10) * ff(1:10) is not recognising the fact that both
objects are of class ff_vector.
Can someone tell me why this is, point me to some documentation how to
solve this and possibly indicate what needs to be done so that the above
code gives similar behaviour as> 1:10 * 1:10
[1] 1 4 9 16 25 36 49 64 81 100
thanks in advance,
Jan
--
groeten/kind regards,
Jan
Jan Wijffels
Statistical Data Miner
www.bnosac.be | +32 486 611708
[[alternative HTML version deleted]]