[Bioc-devel] BiocGenerics attaches when methods package is imported

Andreas Kapouranis kapouranis.andreas at gmail.com
Mon Feb 15 16:52:38 CET 2016


Hi,

I am developing a package for Bioconductor, and I have a weird issue when
importing the 'methods' package. Before I add the 'methods' package in
Imoprts in the DESCRIPTION file, I pass the CMD check without any warnings.

However, when I add the 'methods' package in the Imports field, I get a
warning during CMD check. (I need the methods package since I use the
methods::is() function, and if I call it just as is(), when running the
package from Rscript will fail since by default it does not load the
'methods' package.)

I read a similar issue here:
https://stat.ethz.ch/pipermail/bioc-devel/2015-October/008193.html
and I updated all my packages from Bioconductor including IRanges and
GenomicRanges.

This is the warning that I get, which is exactly the same as the previous
issue in Bioc-Devel, and I understand that for some reason the BiocGenerics
is attached only when the 'methods' package is imported.

* checking for missing documentation entries ... WARNING

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, xtabs

The following objects are masked from ‘package:base’:

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, as.vector, cbind, colnames, do.call, duplicated,
    eval, evalq, get, grep, grepl, intersect, is.unsorted, lapply,
    lengths, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
    tapply, union, unique, unlist, unsplit

All user-level objects in a package should have documentation entries.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.



My DESCRIPTION file when I add the 'methods' package is the following:
...
Depends: R (>= 3.2.0)
LazyData: TRUE
RoxygenNote: 5.0.1
Imports: GenomicRanges,
    IRanges,
    assertthat,
    S4Vectors,
    graphics,
    data.table,
    methods
Suggests: knitr,
    rmarkdown,
    testthat
VignetteBuilder: knitr



Regards,
Andreas

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list