[Bioc-devel] limma Suggests:statmod vs Imports:statmod

Ryan Thompson rct @ending from thomp@oncl@n@org
Fri May 11 09:08:07 CEST 2018

Hi Robert,

My understanding is that the "requireNamespace" trick, combined with
listing the package in "Suggests" is the standard way to implement optional
dependencies. Users of limma that never use duplicateCorrelation or other
functions that require statmod will never need to install it.

For more info, see this old post about the same problem:



On Thu, May 10, 2018 at 11:58 PM Robert Castelo <robert.castelo at upf.edu>

> hi,
> this is a question for limma developers.
> at every new fresh installation of BioC and limma i get this message
> when i use 'duplicateCorrelation()':
> "statmod package required but is not installed"
> i just install 'statmod' and problem solved. this, however, triggers
> questions from some of my students since they expect that BioC
> dependencies within functions are automatically installed when the
> desired package is installed for the first time.
> i've observed within the limma source that the 'statmod' functionality
> is used within other functions and in all cases this is dealt as in
> 'duplicateCorrelation()', where first it's checked whether the package
> namespace can be loaded and the user is asked otherwise to install it:
> if(!requireNamespace("statmod",quietly=TRUE)) stop("statmod package
> required but is not installed")
> and the 'statmod' package is listed in the 'Suggests:' field of the
> just out of curiosity, is there a particular reason to import the
> functionality of 'statmod' in this way? wouldn't be possible to do it
> via 'Imports:'?
> thanks!
> robert.
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

	[[alternative HTML version deleted]]

More information about the Bioc-devel mailing list