From ripley at stats.ox.ac.uk  Tue Jul 27 15:26:31 2010
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 27 Jul 2010 14:26:31 +0100 (BST)
Subject: [Rd] Recover source from LazyLoaded installation
In-Reply-To: <11903DAF-31E4-42B3-8073-528C37E77BD5@comcast.net>
References: <F249B587-EEC5-43CE-9A8A-81E0F1221F64@comcast.net>
	<81B3C76D-F06A-492A-A3BB-009149D69724@r-project.org>
	<11903DAF-31E4-42B3-8073-528C37E77BD5@comcast.net>
Message-ID: <alpine.LFD.2.00.1007271415460.17544@gannet.stats.ox.ac.uk>

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



[Rd] Recover source from LazyLoaded installation
Prof Brian Ripley