[Rd] Inheritance before ANY...

Christophe Genolini cgenolin at u-paris10.fr
Tue Jun 9 22:11:51 CEST 2009


Hi all,
I am programming using S4. I define two classes, "B" is inheriting from 
"A". Apparently (at least since version 2.9.0 ?), when the correct 
signature is not find,
R prefers to chose a signature in the ancestor BEFORE a signature in the 
class. This is very strange to me...

If I define plot for ("A",missing) and ("B",ANY), calling 
plot("B",missing), I would expect R to chose plot("B",ANY) before 
plot("A",missing)

Sincerely
Christophe


------------------ (translate from french) --------
Note : method with signature "A#missing" chose for function "plot",
signature cible "B#missing".
"B#ANY" could also be compatible



More information about the R-devel mailing list