Skip to content
Prev 37261 / 63424 Next

Recover source from LazyLoaded installation

On Mon, 26 Jul 2010, Paul Roebuck wrote:

            
He said use lazyLoad, not library.  It works for me:

env <- new.env()
lazyLoad('R/foo', envir = env)
dump(ls(env, all=TRUE), "foo.R", envir=env)

and BTW this is not going to work if S4 objects are involved and if 
the package had a namespace you'll need the NAMESPACE file (or try to 
recover that from the metadata).