Skip to content

R CMD build error during vignettes build

3 messages · Mikko Korpela, Sébastien Bihorel

#
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"?
#
On 21/02/17 19:06, Sebastian P. Luque wrote:
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:
The error can be investigated with the usual tools, e.g. traceback() and 
debug().
#
On Wed, 22 Feb 2017 12:22:45 +0200,
Mikko Korpela <mikko.korpela at helsinki.fi> wrote:
[...]
This is exactly what I failed to do -> check the tangled output to see
it is complete... It didn't occur to me to do that assuming all the code
would be there.  Even more so considering there's nothing in the CRAN
checks showing problems.

Thank you Mikko!