Skip to content

[R-pkg-devel] Skip running vignette code with package submission

3 messages · Iñaki Ucar, Pamela Russell

#
Hi,

I'm wondering if it's possible to have the CRAN maintainers skip running
the code in my vignettes along with R CMD CHECK. I've developed a package
that wraps a REST API for which authentication is required. My code fails
with a helpful error message if the user does not have a valid API key
installed locally.

I've instructed CRAN to skip the code in my tests (with skip_on_cran()) and
examples (with \dontrun{}), but I can't figure out how to ask them to skip
running the code in my vignettes. Therefore, with my submission, R CMD
CHECK fails with a WARNING:

* checking re-building of vignette outputs ... [3s] WARNING
Error in re-building vignettes:
  ...
Quitting from lines 56-58 (introduction.Rmd)
Error: processing vignette 'introduction.Rmd' failed with diagnostics:
Please request and store a valid API key (instructions:
https://github.com/pamelarussell/TCIApathfinder)
Execution halted

I included a comment about this along with my package submission, but I
believe no human saw it as the package failed an automatic check.

My package source is at https://github.com/pamelarussell/TCIApathfinder.

Thanks,
Pam Russell



-----------------------------------------------------------
Pamela Russell
Research Instructor
Department of Biostatistics and Informatics
Colorado School of Public Health
pamela.russell at ucdenver.edu
#
Hi,

2017-09-11 16:42 GMT+02:00 Pamela Russell <pamela.russell.ucdenver at gmail.com>:
You can conditionally disable your chunks with
knitr::opts_chunk$set(eval = FALSE), as in
https://github.com/r-simmer/simmer/blob/master/vignettes/simmer-03-trajectories.Rmd

This method is further developed in this R Journal article:
https://journal.r-project.org/archive/2017/RJ-2017-026/index.html

Regards,
I?aki
#
Thanks so much, this is working.


-----------------------------------------------------------
Pamela Russell
Research Instructor
Department of Biostatistics and Informatics
Colorado School of Public Health
pamela.russell at ucdenver.edu
On Mon, Sep 11, 2017 at 9:05 AM, I?aki ?car <i.ucar86 at gmail.com> wrote: