Skip to content

[Bioc-devel] lazyData (Kasper Daniel Hansen)

2 messages · Alex Pickering, Kasper Daniel Hansen

#
I was experiencing similar issues of long build times with LazyData TRUE so
I made it FALSE.

You can specify the environment in which data is loaded (it doesn't have to
be the global environment). For example, to load the cmap_es data from the
ccdata package call this from within a function:

utils::data("cmap_es", package = "ccdata", envir = environment())

It will get loaded into the function's environment (not global). You may
also need to add a `cmap_es = NULL` prior to loading it otherwise the build
process will complain about not declaring the cmap_es variable before using
it.
On Sat, Jul 30, 2016 at 3:00 AM, <bioc-devel-request at r-project.org> wrote:

            

  
  
#
Fair enough; I'm aware of this.  But loading the annotation package into
the environment of a function means reloading it every time I need it,
which is pretty often.  LazyData is just so much nicer.

Best,
Kasper

On Sat, Jul 30, 2016 at 12:44 PM, Alex Pickering <alexvpickering at gmail.com>
wrote: