Re: [R] Stumped on methods

2004-07-16 Thread Jim Lemon
Thank you all, gentlemen. getAnywhere(), which I blush to say I have seen flash by in a few recent messages, allowed me to see the awful truth. But for the fact that it sounds like one of those gizmos in science fiction that allow one to turn up in the next galaxy, I might have twigged. Jim __

RE: [R] Stumped on methods

2004-07-16 Thread Liaw, Andy
Jim, As Uwe said, that's not what NextMethod() is for. I suspect what you really want is simply cat()ing the object that you created in your print() method. If you look in must print() and summary() methods, you'll see a lot of cat(). HTH, Andy > From: Uwe Ligges > > Jim Lemon wrote: > > > I

Re: [R] Stumped on methods

2004-07-16 Thread Uwe Ligges
Jim Lemon wrote: I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to methods, I've stuck the whole business into a character object and used: NextMethod("print") Wel

Re: [R] Stumped on methods

2004-07-16 Thread Roger D. Peng
If a method is hidden in a namespace, use getAnywhere(print.whatever) to see the code. -roger Jim Lemon wrote: I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to me

[R] Stumped on methods

2004-07-16 Thread Jim Lemon
I have been trying to write a "proper" print method for a package, and have almost gotten what I want. From a reading of the relevant section in R Extensions and the introduction to methods, I've stuck the whole business into a character object and used: NextMethod("print") However, instead of