[Bioc-devel] LazyData in DESCRIPTION file

Vinh Tran tr@n @end|ng |rom b|o@un|-|r@nk|urt@de
Thu Apr 30 15:05:42 CEST 2020

Dear Kasper,

Many thanks for your reply. Yes, I am using data() to load the data. However, the problem is, when I checked my package using CMD Check, it threw me the warning that I am using that data only in the example but not in code. I see the disadvantages of LazyData, but I just want to know in this case, how can I solve that issue by not using LazyData. If you have any solutions, I am very appreciated! 

Btw, I added “LazyData: true” to the DESCRIPTION and the warning went away. So, I am not sure if it must always be uppercase.

Best regards,

Dr. Vinh Tran

Dept. for Applied Bioinformatics
Inst. for Cell Biology and Neuroscience
Goethe University Frankfurt

Biologicum, Room 3.209
Phone +49 (0)69/798-42118

> On 30. Apr 2020, at 14:55, Kasper Daniel Hansen <kasperdanielhansen using gmail.com> wrote:
> If you don't have lazy data on, you should be able to load the data by using data().  Let us say you example data is called expData.
> With lazy data
>   print(expData)
> Without lazy data you need explicit loading
>   data(expData)
>   print(expData)
> For the purpose of examples, there is also a user-level advantage of using an explicit data() statement: the user can see that the data comes from somewhere, instead of appearing out of nowhere. For examples, I actually only see advantages of not using lazyData, because of these explicit statements.
> My historical impression: I would say that when lazyData was introduced, it seems to me that the intention was widespread use. It seems to me that the tides have turned against lazy data and the official recommendation is to not use it unless you have good reasons.  One disadvantage with widespread use of lazyData is that the names of these objects have to be accessible somewhere.
> Note: one thing I have realized very belatedly is that the lazyData field is a boolean, the right statements are one of
>   lazyData: TRUE
>   lazyData: FALSE
> For example, I think it has to be all uppercase.
> Best,
> Kasper
> On Wed, Apr 29, 2020 at 6:05 PM Vincent Carey <stvjc using channing.harvard.edu <mailto:stvjc using channing.harvard.edu>> wrote:
> I see this is guideline 7 at
> https://bioconductor.org/developers/package-guidelines/ <https://bioconductor.org/developers/package-guidelines/>
> I have used LazyData: TRUE so that [pkgname]::[entity] can be used instead
> of data().  The
> claim that it is "rarely a good thing" and slows down package loading can
> be weighed against
> convenience.  I am not sure you should use LazyData to avoid a
> documentation warning
> however.  Can you give more details on what package is generating the
> warning?
> On Wed, Apr 29, 2020 at 5:34 PM Vinh Tran <tran using bio.uni-frankfurt.de <mailto:tran using bio.uni-frankfurt.de>> wrote:
> > Dear Bioc members,
> >
> > I have just encountered a warning during the CHECK that some data objects
> > are used in the documents but not in code (e.g. “Variables with usage in
> > documentation object ‘ppTree’ but not in code"). They are the demo data,
> > that I am using only in the examples for demonstrate the usage of some
> > functions. Adding LazyData: True to the DESCRIPTION can solve that issue,
> > but according to the package guidelines it is not recommended. Could you
> > please show me what should I do in this case? The demo data is only about
> > 15 KB at max.
> >
> > Many thanks for your advices!
> >
> > Best regards,
> > Vinh
> >
> > --------------------------------
> > Dr. Vinh Tran
> >
> > Dept. for Applied Bioinformatics
> > Inst. for Cell Biology and Neuroscience
> > Goethe University Frankfurt
> >
> > Biologicum, Room 3.209
> > Phone +49 (0)69/798-42118
> >
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioc-devel using r-project.org <mailto:Bioc-devel using r-project.org> mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel <https://stat.ethz.ch/mailman/listinfo/bioc-devel>
> >
> -- 
> The information in this e-mail is intended only for th...{{dropped:16}}

More information about the Bioc-devel mailing list