Thank you both for your answers. On Fri, Feb 26, 2010 at 7:58 PM, Duncan Murdoch <murd...@stats.uwo.ca>wrote:
> > You aren't seeing the print method, you are seeing a newly created print > generic function. As Uwe mentioned, print() is not an S4 generic, so when > you create your print method, a new S4 generic also gets created. You > should be using show(), which will be called by print() when necessary. > > When you say "clear the memory", I'm not sure what you have in mind, but S4 > methods are not stored in your workspace, so rm(list=ls()) won't delete > them. You need removeMethod() to get rid of a method. > > Duncan Murdoch > What I meant with "clear the memory" is exactly rm(list=ls()). I use the same analysis on different rather big datasets, so I have to make some space once in a while. To lose the "print" generic (thx for the correction) every time I considered highly inconvenient. I'll use the show method, thank you both for the tip. Do I understand it right that every generic I define in a normal scriptfile is saved in the workspace, and thus can be removed with rm() ? Cheers Joris [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.