[Rd] Unexplained strange behaviour of callNextMethod in S4 methods

From: Harold Petithomme <harold.petithomme_at_meteo.fr>
Date: Mon, 04 Oct 2010 12:49:18 +0200

Hello all.

A few days ago, I submitted a problem which remains unsolved although somebody answered to my question. I still have the problem. Can someone please explain if something is wrong ?

Have a look at this example:

setGeneric("f",valueClass="NULL",def=function(x) standardGeneric("f"))


    a = x_at_a
    cat("nombre :",a,"\n")


    cat("mot :",x_at_b,"\n")

a = new("A",a=1)
b = new("B",b="hello",a)


This last command (f(b)) fails. But remove the 'valueClass="NULL"' setting in setGeneric or add argument x to the call to callNextMethod and it will be OK! Isn't it tricky?

Thanks in advance for any help.


Equipe Données et Outils de Prévision (DPREVI/COMPAS/DOP)

Météo France - Direction de la Production
42, avenue G. Coriolis.
31057 Toulouse Cedex

Tel : (33/0)
Fax : (33/0)
E-mail : harold.petithomme_at_meteo.fr

R-devel_at_r-project.org mailing list
Received on Mon 04 Oct 2010 - 10:37:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Oct 2010 - 13:00:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive