Re: [Rd] an unpleasant interaction of environments and generic functions

2006-01-31 Thread Uwe Ligges
Ross Boylan wrote: > I've run into an unpleasant oddity involving the interaction of > environments and generic functions. I want to check my diagnosis, and > see if there is a good way to avoid the problem. > > Problem: > A library defines > "foo" <- function(object) 1 > setMethod("foo", c("mat

Re: [Rd] an unpleasant interaction of environments and generic functions

2006-01-31 Thread Ross Boylan
On Tue, 2006-01-31 at 15:21 -0800, Ross Boylan wrote: > Any suggestions about how to avoid this problem? > Maybe sys.source("file", 2)... Seems to work! Not quite. The original versions of some stuff from the library hung around, and my efforts to delete them led to more difficulties. Specifical

[Rd] an unpleasant interaction of environments and generic functions

2006-01-31 Thread Ross Boylan
I've run into an unpleasant oddity involving the interaction of environments and generic functions. I want to check my diagnosis, and see if there is a good way to avoid the problem. Problem: A library defines "foo" <- function(object) 1 setMethod("foo", c("matrix"), function(object) 30) After l