[R-pkg-devel] Disable a particular knitr vignette

Iñaki Úcar i@uc@r86 @ending from gm@il@com
Thu Aug 2 10:04:02 CEST 2018

Hi everyone,

I have a JSS vignette based on the rticles package. It was compiling
just fine until rticles v0.5 for some reason started requiring pandoc
v2.x for such a document class, and failing otherwise. Due to this
requirement, Windows machines on CRAN show a nasty WARN, because they
still have pandoc v1.x.

It is painful for Uwe to install pandoc v2.x there, so I was wondering
whether there's any easy mechanism to just disable a particular
vignette based on some condition (in this case, it would be "we are on
CRAN, this is Windows and the pandoc version is < 2"; this is easy to

I tried putting a condition for the output format in the YAML header
and it works, i.e.:

output: if (cond) rticles::jss_article else rmarkdown::pdf_document

But rmarkdown::pdf_document fails to compile, because the JSS class
has many custom macros. I tried also putting a NULL or a NA there, and
it doesn't work.

Does any knitr ninja here know if there's some easy trick to do this
and make Uwe's life easier? Some "NULL" document format?


More information about the R-package-devel mailing list