[R-pkg-devel] Using \donttest with R >= 4.0.0

Martin Ondrus mondru@ @end|ng |rom u@|bert@@c@
Tue Nov 16 20:16:02 CET 2021


Hi Duncan,

That's a fair point, and I think making the examples run quicker probably
makes the most sense. I have bad experiences with using dontrun - my
package always gets flagged. Although not ideal, it's probably better to
include some very fast running examples rather than none at all. Appreciate
your advice/help!

Cheers,

Martin

On Tue, Nov 16, 2021 at 12:08 PM Duncan Murdoch <murdoch.duncan using gmail.com>
wrote:

> 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
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list