[Bioc-devel] BiocCheck warnings and errors

Hervé Pagès hp@ge@@on@g|thub @end|ng |rom gm@||@com
Tue Sep 13 21:29:56 CEST 2022


On 13/09/2022 11:39, Marcel Ramos wrote:

>
>
...
>>>
>>> On 13/09/2022 17:47, Hervé Pagès wrote:
...
>>>> Having BiocManager::install() calls in the package should be ok as
>>>> long as those calls are **not** executed by R CMD build or R CMD
>>>> check. Running R CMD build or R CMD check should never install
>>>> packages on the user machine.
>>>
> My 2cents is to avoid installing packages for users even if
> you may find it more convenient for them. A function in any package
> should have have runnable examples and these will install
> packages when running R CMD check.

It won't install anything if the function uses 
BiocManager::install(update=FALSE, force=FALSE). 'R CMD check' will fail 
early if not all the suggested packages are already installed. 
Therefore, by the time it gets to run the examples, all the suggested 
packages should already be installed so 
BiocManager::install(update=FALSE, force=FALSE) will be a no-op.

In any case this would be a case where putting the code in a \donttest{} 
statement is ok.

H.

-- 
Hervé Pagès

Bioconductor Core Team
hpages.on.github using gmail.com



More information about the Bioc-devel mailing list