[R-pkg-devel] (no subject)

Tim Keitt tkeitt at utexas.edu
Wed Jan 10 06:49:15 CET 2018


I'm seeing:

* checking re-building of vignette outputs ... [3s] WARNING
> Error in re-building vignettes:
> ...
> Quitting from lines 24-60 (strider.Rmd)
> Error: processing vignette 'strider.Rmd' failed with diagnostics:
> package 'dplyr' is not installed for 'arch = x64'
> Execution halted



I'm a little confused because my vignette avoids loading any packages that
are not available. Is this because the "eval" option is not available in
the version of knitr used by CRAN?

Here's the vignette code:

>
> ---
> title: "The Strider Package"
> author: "Timothy H. Keitt"
> date: "`r Sys.Date()`"
> output: rmarkdown::html_vignette
> vignette: >
>   %\VignetteIndexEntry{Vignette Title}
>   %\VignetteEngine{knitr::rmarkdown}
>   %\VignetteEncoding{UTF-8}
> ---
> ```{r include=FALSE}
> has_packages = all(c("dplyr", "ggplot2", "microbenchmark") %in%
> rownames(installed.packages()))
> not_has_packages = !has_packages
> ```
> ```{r echo=FALSE, eval=not_has_packages}
> cat("Error: You must install dplyr, ggplot2 and microbenchmark to run the
> code in this vignette.")
> ```
> ```{r include=FALSE, message=FALSE, warning=FALSE, eval=has_packages}
> library(dplyr)
> library(ggplot2)
> library(microbenchmark)
> ...


This works fine on my computer even if I uninstall dplyr, etc. But it
appears that when CRAN tries to rebuild the vignette, the "eval" flag is
ignored?

Tricky to reproduce as the exact code used to regenerate the vignette is
not part of the output.

THK


http://www.keittlab.org/

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list