[Rd] When to use LazyLoad, LazyData and ZipData?

Bjørn-Helge Mevik bhs2 at mevik.net
Wed Nov 14 14:35:28 CET 2007

Duncan Murdoch wrote:

> On 11/14/2007 7:01 AM, Bjørn-Helge Mevik wrote:
>> When should one specify LazyLoad, LazyData, and ZipData?
> I think that you shouldn't care about these things, and should accept
> the default for them unless one of those two pieces of advice applies
> to you.  Let the package install code decide on what values to use.

Thank you.  That seems like a reasonable strategy. :-)

The only small `snag' I can see is how to document the usage of data
sets.  As I understand from `Writing R Extensions' (`The \usage entry
is always bar or (for packages which do not use lazy-loading of data)
data(bar).')  It is preferrable to use \usage{bar} when LazyData is
true, and \usage{data(bar)} otherwise.  Since data(bar) always works,
I guess the best strategy (when leaving LazyData to its default) is to
use \usage{data(bar)}.

> If you want to know the current defaults, look at the INSTALL script
> in R_HOME/bin,

Ah.  I should have thought about that. :-)

Bjørn-Helge Mevik

More information about the R-devel mailing list