search for: badadd

Displaying 1 result from an estimated 1 matches for "badadd".

2012 Jun 14
2
"Incompatible methods" for overloaded operator
...r about "Incompatible methods". (In the actual code, the overloaded + function checks the classes of x1 and x2, and then sends them off to other functions.) This is the NAMESPACE file: S3method("+",a) S3method("+",b) I've put the code up at https://github.com/wch/badadd. If I just cut and paste the function definitions to my R session, it works fine: x + y # Running + function # NULL However, if I install and load the package, it gives a warning about incompatible methods, and then seems to fall back to the arithmetic + operator: library(badadd) x + y # [1] 3...