Re: [Rd] Recover source from LazyLoaded installation

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue, 27 Jul 2010 14:26:31 +0100 (BST)

On Mon, 26 Jul 2010, Paul Roebuck wrote:

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

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).

>
> Sent from my iPhone
>
> On Jul 25, 2010, at 7:03 PM, Simon Urbanek <simon.urbanek_at_r-project.org> wrote:
>
>>
>> On Jul 23, 2010, at 2:46 PM, Paul Roebuck wrote:
>>
>>> 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.
>>>
>>
>> ?lazyLoad
>>
>> Cheers,
>> Simon
>>
>>
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 27 Jul 2010 - 13:34:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 27 Jul 2010 - 19:00:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive