[Rd] R CMD build error during vignettes build

Mikko Korpela mikko.korpela at helsinki.fi
Wed Feb 22 11:22:45 CET 2017


On 21/02/17 19:06, Sebastian P. Luque wrote:
> Hello,
>
> I'm trying to rebuild a package (using R version 3.3.2 (2016-10-31))
> that has not seen any changes since it was last built without problems
> in previous R versions.  It fails during vignette building with:
>
> ---<--------------------cut here---------------start------------------->---
> $ R CMD build diveMove
> * checking for file ‘diveMove/DESCRIPTION’ ... OK
> * preparing ‘diveMove’:
> * checking DESCRIPTION meta-information ... OK
> * installing the package to build vignettes
> * creating vignettes ... ERROR
> Quitting from lines 432-438 (diveMove.Rnw)
> Error: processing vignette 'diveMove.Rnw' failed with diagnostics:
> missing values and NaN's not allowed if 'na.rm' is FALSE
> Execution halted
> ---<--------------------cut here---------------end--------------------->---
>
> There are no problems running the R code resulting from tangling the
> vignette.  Specifically, the code referred to in the error is a single
> function call, which returns with no warnings or errors, so I have
> little to hold on to.  How can I get more verbose debug from "R CMD
> build"?
>

Are you sure that the complete R code of the vignette runs without 
errors? I can't help you with getting more verbose output from 'R CMD 
build', but the error can be reproduced with other means, as outlined below.

When trying to build the vignette from the git version of your package 
(as part of R CMD build), I see the same error message. Investigating 
further, the "tangled" file diveMove.R from 
'tools::buildVignette("diveMove.Rnw")' has 68 lines and stops short of 
the code chunk "zoc" where the error occurs. Running that code obviously 
works fine.

However, 'tools::buildVignette("diveMove.Rnw", weave = FALSE)' outputs a 
longer (154 lines) diveMove.R (presumably containing the complete code 
of the vignette) which includes the chunk "zoc". Executing the code with 
source() produces the expected error. This also identifies the call 
where the error occurs:

> Error in quantile.default(Ad1.maybe.nat, probs = (1 - ascent.crit.q)) :
>   missing values and NaN's not allowed if 'na.rm' is FALSE

The error can be investigated with the usual tools, e.g. traceback() and 
debug().

-- 
Mikko Korpela
Department of Geosciences and Geography
University of Helsinki



More information about the R-devel mailing list