[R-pkg-devel] Using \donttest with R >= 4.0.0
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Tue Nov 16 21:16:18 CET 2021
(This crossed with Martin Ondrus's reply).
In the past few years CRAN screeners have gotten more strict about
\dontrun{}; a first-round screening often comes back requesting that
\dontrun{}, and commented-out examples, not be used.
https://stat.ethz.ch/pipermail/r-package-devel/2018q3/003084.html
https://stat.ethz.ch/pipermail/r-package-devel/2018q2/002811.html
Guido, perhaps the screening is being applied differently in your case?
Another strategy, albeit one that is a little bit annoying/requires
some more machinery, is to store pre-computed objects in
inst/example-data, then do something like
fitted_model <- readRDS(system.file("example-data", "fit1.rds", package
= "my_pkg"))
the object (which takes too long to fit as part of a testing flow)
then becomes available for showing how methods apply to it.
cheers
Ben
On 11/16/21 2:56 PM, Guido Schwarzer wrote:
> Am 16.11.21 um 20:16 schrieb Martin Ondrus:
>
>> 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!
>
> I have been using dontrun for a long time (and I am still using it)
> without any real issues. Initially, I used it to get rid of runtime
> notes impeding submission to CRAN. Now I am also using it for additional
> features, e.g., to describe some additional analyses / figure layouts.
>
> I always check my packages under R-devel on
> https://win-builder.r-project.org/ before submission to CRAN. If this
> does not trigger any notes, the package is good to go.
>
> Best, Guido
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
--
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics
More information about the R-package-devel
mailing list