[Rd] CRAN packages mis-using \donttest : falsy

Gábor Csárdi csardi.gabor at gmail.com
Mon Dec 8 15:40:34 CET 2014

Hi all,

anyone has an idea how I could fix this?

## Set colors from colorspace package with a fallback
col <- try(colorspace::rainbow_hcl(5), silent = TRUE) %||% rainbow(5)

The problem is that this makes R CMD check freak out
if the colorspace package is not declared as a dependency. But the
point of the example is to define a meaningful behavior when
colorspace is missing.... so I don't really want to put this into

I vaguely remember that there was also \dontcheck{}, but it is not in
'Writing R extensions', so probably I cannot use it. Or can I? I am
not even sure what the difference is between \donttest and


On Mon, Dec 8, 2014 at 7:38 AM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> This concerns packages using \donttest in their examples.  Such code
> will be run by example() and hence should be runnable ... yours is
> not.
> One issue showing is that the examples use undeclared packages: this
> is showing on the CRAN check pages for packages
> Distance GLDreg RECA TreePar complmrob disposables egcm enigma
> extrafont falsy ggplot2 imputeYn investr lava prodlim randomForestSRC
> rbison separationplot shiny smoother vcdExtra
> With R-devel the \donttest examples can be run by R CMD check
> --run-donttest: we have done that and found failures in packages most
> of those above, plus
> BNSP DCGL EIAdata ExtDist FeedbackTS FlexParamCurve IsoGene MGLM
> MsatAllele PRISMA RSurvey RandomFields ReporteRs Rmpi Rssa TR8 VarEff
> aoristic breakage dplyr effects ftsa geocodeHERE ggHorizon ggmap
> ggtern gvcm.cat hyperSpec knitcitation knitr mboost mets mfblock
> mobForest mra nontarget npRmpi nullabor openNLP parfm plsRbeta powerr
> pxweb rcrossref rgbif rsnps season spMC spgwr spocc taxize timereg
> toaster
> and warnings in DSpat
> In almost all cases there is something obviously wrong with the
> failing example.
> Please submit an update to CRAN (using the webform, and following the
> CRAN policies at http://cran.r-project.org/web/packages/policies.html).
> Do NOT reply to this email to submit an update!
> There may be other issues that need fixing shown on the package's
> results page.

More information about the R-devel mailing list