[Rd] Overwrite S3 methond from base package

2012-02-13 Thread Thaler,Thorn,LAUSANNE,Applied Mathematics
Dear all, I am developing a package, which bundles my most frequently used functions. One of those is a modified version of droplevels from the base package (basically, it preserves any contrast function which was used to create the factor, contrast matrices are not kept, for they could be wrong

Re: [Rd] Overwrite S3 methond from base package

2012-02-13 Thread Patrick Burns
The key question is: So, is there any way to overwrite droplevels.factor and droplevels.data.frame from the base package with my functions? There is can and there is should. I don't know the answer to can. In regard to should, I think it is a very very bad idea. The result that someone

Re: [Rd] Overwrite S3 methond from base package

2012-02-13 Thread Thaler,Thorn,LAUSANNE,Applied Mathematics
In regard to should, I think it is a very very bad idea. The result that someone gets depends on whether or not the new package is attached in the session. That is a recipe for hours (or days) of trying to figure out mysterious behavior. I fully agree. However, there are 2 reasons in