Skip to content
Prev 39944 / 63421 Next

How to create vignette.pdf for R-2.13.0?

Dear Uwe,

Your suggestion to look at the Sweave manual helped me to solve the 
problem. It seems that in R-2.13.0 every chunk can use the code from the 
chunk before but not from an earlier chunk.

Concretely, the following does not work since chunk 5 needs the code 
from chunk 3 and 4:

###################################################
### chunk number 3:
###################################################
#line 126 "xps.Rnw"
celdir <- file.path(.path.package("xps"), "raw")

###################################################
### chunk number 4:
###################################################
#line 132 "xps.Rnw"
scheme.test3 <- root.scheme(file.path(.path.package("xps"), "schemes", 
"SchemeTest3.root"))

###################################################
### chunk number 5:
###################################################
#line 137 "xps.Rnw"
celfiles <- c("TestA1.CEL","TestA2.CEL")
data.test3 <- import.data(scheme.test3, "tmpdt_DataTest3", 
celdir=celdir, celfiles=celfiles, verbose=FALSE)


However, when I add "celdir" to chunk 5 then everything works since now 
chunk 5 needs only the code from chunk 4 but not from chunk 3:

###################################################
### chunk number 5:
###################################################
#line 137 "xps.Rnw"
celdir   <- file.path(.path.package("xps"), "raw")
celfiles <- c("TestA1.CEL","TestA2.CEL")
data.test3 <- import.data(scheme.test3, "tmpdt_DataTest3", 
celdir=celdir, celfiles=celfiles, verbose=FALSE)


Now buildVignettes() is able to create the vignettes, however R CMD 
check still does not build the vignettes.


Yes, I get a Warning in both cases:
* checking package vignettes in 'inst/doc' ... WARNING
Package vignettes without corresponding PDF: ........

However, with R-2.12.2 the following lines are added:

/Volumes/CoreData/CRAN/xps.Rcheck/00_pkg_src/xps/inst/doc/APTvsXPS.Rnw
/Volumes/CoreData/CRAN/xps.Rcheck/00_pkg_src/xps/inst/doc/xps.Rnw
/Volumes/CoreData/CRAN/xps.Rcheck/00_pkg_src/xps/inst/doc/xpsClasses.Rnw
/Volumes/CoreData/CRAN/xps.Rcheck/00_pkg_src/xps/inst/doc/xpsPreprocess.Rnw

and in xps.Rcheck the subdirectory "inst/doc" will be created which 
contains the vignette data such as xps.Rnw, but also xps.tex and xps.pdf.

In contrast, R-2.13.0 does not create the subdirectory "inst/doc" and no 
vignettes are built.

One more issue:
In contrast to my former believe R CMD INSTALL does not build the 
vignettes, neither in R-2.12.2 nor in R-2.13.0. I have to run 
buildVignettes() after installation. Is this the usual case?

Best regards
Christian
On 4/25/11 4:00 PM, Uwe Ligges wrote: