On 05/05/2016 02:05 AM, Leonardo Collado Torres wrote:
Hi,

I need some help with a new package I'm coding (which we plan to
submit to BioC). I keep getting a warning in R CMD check that I
haven't been able to figure out what is wrong. I'm guessing that it's
something fairly straightforward, I'm just not seeing it right now.

The warning is:

checking for missing documentation entries ... WARNING
## some output from loading SummarizedExperiment
All user-level objects in a package should have documentation entries.
See chapter ‘Writing R documentation files’ in the ‘Writing R

See https://travis-ci.org/leekgroup/recount/builds/127982505#L746-L778
for details. The package code that matches this build report is
https://github.com/leekgroup/recount/tree/35c0f786411e8e63b9ed76866d71273fef9654ea.

I've read a few times
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Documenting-data-sets
and double checked the documents. They seem fine to me.

My guesses are:
* Maybe I need to add to imports the SummarizedExperiment package,
although the links like
\link[SummarizedExperiment]{RangedSummarizedExperiment-class} do work.
* Maybe I need to add \source{...} although I don't see this warning
with https://github.com/lcolladotor/derfinder/blob/master/R/genomicState-data.R
which doesn't use \source{...}

If you have any tips on how I could narrow down the warning, that'd be
great. I guess that I can try removing 1 by 1 the 5 data objects from
this new package, building and checking to find which of them is the
culprit.

You can reproduce this problem by installing recount and saying

    tools::undoc("recount")

The output from loading packages is unexpected.

The problem occurs when tools::undoc() tries to check that the data objects are documented. When an S4 object is loaded, at

  https://github.com/wch/r-source/blob/trunk/src/library/tools/R/QC.R#L189

This triggers loading of packages defining any classes in the object. In your case I guess you have a SummarizedExperiment, and so the SummarizedExperiment package is loaded. The output from loading the package is interpreted as a warning message.

I think a fix for R-3-3-branch is

Index: src/library/tools/R/QC.R
===================================================================
--- src/library/tools/R/QC.R    (revision 70582)
+++ src/library/tools/R/QC.R    (working copy)
@@ -186,7 +186,7 @@
                 Filter(function(f) {
## NB: this get() is expensive as it loads every object
                     fdef <- get(f, envir = code_env)
-                    if(methods::is(fdef, "genericFunction"))
+                    if(.try_quietly(methods::is(fdef, "genericFunction")))
                         fdef@package == pkgname
                     else
                         TRUE

I think you should live with the warning, counting on this fix to be applied, rather than come up with a workaround (moving SummarizedExperiment from Suggests: to Depends:).

Martin


Thanks!
Leo

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to