Displaying 2 results from an estimated 2 matches for "addnextmethod".
2005 Jun 02
1
showMethods doubt
...> myobj <- new("myclass", name="my name is joe")
> mymeth(myobj)
[1] "Hi, my name is joe and I don't know what to do with showMethods !"
So the method is working, let's use showMethods:
> showMethods(classes="myclass")
Function "addNextMethod":
<Empty Methods List>
Function "body<-":
<Empty Methods List>
Function "coerce":
<Empty Methods List>
Function "initialize":
.Object = "myclass"
(inherited from .Object = "ANY")
Function "loadMethod":
&l...
2006 May 11
2
S4 initialize methods, unexpected recursive callNextMethod
Hi,
Given a simple three class hierarchy: A <-- B <-- C
I want to define an initialize method for each class such that when I
call new("C", x=5), the initialize methods for A and B are used to
incrementally build the object.
When I do what seems obvious to me using callNextMethod, I get an
infinite recursion. An example follows...
setClass("A",