[R-pkg-devel] Using \donttest with R >= 4.0.0
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Tue Nov 16 20:08:51 CET 2021
On 15/11/2021 2:30 p.m., Martin Ondrus wrote:
> Hello,
>
> I am a package maintainer for the package "fabisearch" which is now
> archived on CRAN. The package includes many examples which take a long time
> to run. In past versions of R, I used to simply wrap these in \donttest and
> the examples ran as expected. With R >= 4.0.0 however, examples wrapped in
> \donttest are run during R CMD check --as-cran. This causes issues with my
> package as it takes way too long to run the entire check for CRAN
> submission.
>
> I have looked across stackoverflow and other forums to see what are some
> possible solutions to implement. From the few that I was able to find,
> there were none that work. The most promising seemed to be to simply use
> \dontrun instead of \donttest, but this caused my package to be flagged
> during submission and failed the initial check.
>
> As such, I am looking for help with this matter. Now that the functionality
> of \donttest has changed, what is the appropriate/best way for me to keep
> my current examples while ensuring that during the R CMD check --as-cran
> process these examples are not run?
I'd say if you want to keep those examples, then wrap them in \dontrun,
and add other examples that execute quickly.
Even better might be to include only the ones that execute quickly:
just like CRAN, users don't want to wait a long time for examples to
finish.
Duncan Murdoch
More information about the R-package-devel
mailing list