Re: [Rd] UseMethod infelicity

2006-05-22 Thread Henrik Bengtsson
On 5/20/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > Here are three examples where this matters, and I think the bug is > elsewhere! > > 1) Package accuracy does > > ZeligHooks<-function (...) { > if (exists(".simHooked",envir=.GlobalEnv)) { > return(TRUE) > } > origsim=g

Re: [Rd] UseMethod infelicity

2006-05-20 Thread Prof Brian Ripley
Here are three examples where this matters, and I think the bug is elsewhere! 1) Package accuracy does ZeligHooks<-function (...) { if (exists(".simHooked",envir=.GlobalEnv)) { return(TRUE) } origsim=get("sim",envir=as.environment("package:Zelig")) sim.replacement=functi

[Rd] UseMethod infelicity

2006-05-19 Thread Prof Brian Ripley
If I do > example(lm) ... > mycoef <- function(object, ...) UseMethod("coef", object) > mycoef(lm.D9) Error in mycoef(lm.D9) : no applicable method for "coef" which is pretty surprising, as coef has a default method. After a bit of digging, this comes from do_usemethod having defenv = e