[Bioc-devel] BiocCheck warnings and errors

Christian Arnold chr@rno|d @end|ng |rom web@de
Tue Sep 13 22:20:59 CEST 2022

On 13.09.22 21:29, Hervé Pagès wrote:
> 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.

Didnt the behavior of \donttest change with R 4.0 so that |R CMD check
--as-cran|now runs|\donttest|examples (see
Not sure whether \donttest or \dontrun is better in a Bioc context.

I have the example code of this "convenience function" in a \dontrun
block currently to prevent any execution that may install additional
packages. I get the comment from Marcel, however, that providing the
exact line of code that needs to be issued to install the missing
packages is also a good alternative. Will think about it. Thanks guys,
interesting discussion.

> H.

	[[alternative HTML version deleted]]

More information about the Bioc-devel mailing list