Skip to content

Recover source from LazyLoaded installation

4 messages · Simon Urbanek, Paul Roebuck, Brian Ripley

#
Is there a means of recovering the source from a package with LazyLoad = true? Package is Windows 2.9.1 pure R but have no access to original. In R directory, I see <pkgname>, 
<pkgname>.rd[bx], <sysdata>.rd[bx]. Attempting this on OS X 10.6 with R-2.11.1 if it matters.

Sent from my iPhone
2 days later
#
On Jul 23, 2010, at 2:46 PM, Paul Roebuck wrote:

            
?lazyLoad

Cheers,
Simon
#
I had already tried that but can't get past this:
Error: package was built before R 2.10.0: please re-install it

Sent from my iPhone
On Jul 25, 2010, at 7:03 PM, Simon Urbanek <simon.urbanek at r-project.org> wrote:

            
1 day later
#
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).