[Rd] Cran package checks
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Thu Sep 6 03:17:47 CEST 2012
On Wed, Sep 5, 2012 at 12:08 PM, Terry Therneau <therneau at mayo.edu> wrote:
> My biggest time offender is in the vignettes. After multiple readings of
> the docs I still can't quite figure out how to specify
> - pdf files that should be in the vignettes index, but are not .Rnw
> - how to tell R which ones to redo, and which to just accept the pdf
> - per the policy line "all source for pdf should be available",
> non-inclusion of the Rnw file isn't an answer.
> Again, is there another document I'm missing?
If you have multiple Rnw files producing pdfs, and you only want some
of them to be run, you do the following. Say we have
big.Rnw (takes a long time to run)
small.Rnw (is quick)
You run yourself big.Rnw and produce big.pdf. Then you put
small.Rnw in /vignettes
big.Rnw and big.pdf in inst/doc
That way, big.Rnw will not get run. And the package installation will
contain both Rnw files and pdf files for both vignettes.
Note that this only works if you have both a quick and a long
vignette. If you only have big.Rnw and big.pdf in inst/doc and
nothing in vignettes, R would still run Sweave on big.Rnw.
I agree the section on this in R-exts is a bit opaque: "By default R
CMD build will run Sweave on all files in Sweave format in vignettes,
or if that does not exist, inst/doc (but not in sub-directories)."
More information about the R-devel