Skip to content

stumped on re-building package vignette

2 messages · Michael Friendly, Paul Johnson

#
[Env: Win Xp / StatET 2.0 / R 2.15.0]

In my heplots package I extended the HE-examples.Rnw vignette under 
inst/doc. The package passes R CMD check
on my machine:

* using log directory 'C:/eclipse-3.7/heplots.Rcheck'
* using R version 2.15.0 (2012-03-30)
* using platform: i386-pc-mingw32 (32-bit)
...
* checking sizes of PDF files under 'inst/doc' ... OK
* checking installed files from 'inst/doc' ... OK
* checking examples ... OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ...
'HE-examples.Rnw' ... OK
'repeated.Rnw' ... OK
...

However, on R-Forge and on CRAN, the following error/warning is generated:

Mon Jun  4 20:18:22 2012: Checking package heplots (SVN revision 136) ...
* using log directory ?/mnt/building/build_2012-06-04-20-02/RF_PKG_CHECK/PKGS/heplots.Rcheck?
* using R version 2.15.0 Patched (2012-06-03 r59505)
* using platform: x86_64-unknown-linux-gnu (64-bit)
   ...
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ?inst/doc? ... OK
* checking running R code from vignettes ...
    ?HE-examples.Rnw? ... [4s/4s] OK
    ?repeated.Rnw? ... [4s/4s] OK
  [9s/9s] OK
* checking re-building of vignette PDFs ... NOTE
Error in re-building vignettes:
   ...
Loading required package: car
Loading required package: MASS
Loading required package: nnet
Error: processing vignette 'HE-examples.Rnw' failed with diagnostics:
cannot open file 'fig/plot-plastic1.pdf'
Execution halted

* checking PDF version of manual ... OK

I am unable to determine why the file fig/plot-plastic1.pdf cannot be 
opened. It is in my inst/doc/fig directory & is regenerated
by the .Rnw file. What could cause this?

Second, I have tried manually running 
tools::compactPDF("HE-examples.pdf) on the .pdf file under inst/doc in 
the package,
but no change is made to the .pdf file. I can't see any way to correct this.
6 days later
#
On Wed, Jun 6, 2012 at 8:21 AM, Michael Friendly <friendly at yorku.ca> wrote:
2 suggestions.

First, On your own workstation, run the cmd check like so

R CMD check --as-cran package.tar.gz

That will give you results more like CRAN or Rforge.

Second, how did your pdf get into the folder "fig"?  It makes me
suspect you are using some forbidden Sweave settings.

Oh, Third, here's a suggestion.  Build your own vignette, copy from
vignettes to inst/doc, and then in the DESCRIPTION file include the
option to ask the R system not to rebuild your vignette.

BuildVignettes: false

I think you will see this discussed/debated in R-devel and the
situation is somewhat fluid.

pj