From kasperdanielhansen at gmail.com  Thu Sep  6 03:17:47 2012
From: kasperdanielhansen at gmail.com (Kasper Daniel Hansen)
Date: Wed, 5 Sep 2012 21:17:47 -0400
Subject: [Rd] Cran package checks
In-Reply-To: <504778E5.80507@mayo.edu>
References: <504778E5.80507@mayo.edu>
Message-ID: <CAC2h7usg0zkdYAjrJTh0Oo8U_LBKRgxkSXm6DuVKFyc_Apkkjw@mail.gmail.com>

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
> source
>         - 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)."
(R-exts 1.4)

Kasper



[Rd] Cran package checks
Kasper Daniel Hansen