From mcintosh at research.telcordia.com  Sun Aug 19 03:12:32 2007
From: mcintosh at research.telcordia.com (Allen McIntosh)
Date: Sat, 18 Aug 2007 21:12:32 -0400
Subject: [Rd] Overriding S4 methods in an installed package
In-Reply-To: <46C75072.3050101@stats.uwo.ca>
References: <200708172217.l7HMHG6a025509@mcintosh.research.telcordia.com>	<m28x88u4em.fsf@fhcrc.org>
	<46C74E23.10408@research.telcordia.com>
	<46C75072.3050101@stats.uwo.ca>
Message-ID: <46C79900.6000402@research.telcordia.com>

Duncan Murdoch wrote:
> I think you can set the environment of your method to see the package 
> internals.  Those internals won't see your method, though.
> 
> To do this, you'd do something like
> 
> newfoo <- function(obj , x, y) { new definition }
> environment(newfoo) <- environment(foo) # or some other function from 
> the package
> 
> setMethod("foo", signature(obj = "bar"),
>        newfoo)

That did it.  Thank you.



[Rd] Overriding S4 methods in an installed package
Allen McIntosh