I'm currently converting an JSS article, which uses knitr
, to an R package vignette. However, I'm in doubt on the vignette placement, structure, and how I should handle the very long computation times it requires which is ~2 days on a ordinary laptop.
The official documentation offer little to no information regarding this. A short note in an answer in the mailing list is the only information I find when searching. Brian Ripley writes here:
In particular, CRAN does accept packages with Sweave vignettes that take too long to check -- one takes ca 8 hours [...]. We just ask that we are told so on submission.
Hadley Wickham's description of vignettes says to set eval = FALSE
as the chunk option. However, this is not a viable approach in my case as the generated data from the computations are needed.
This presentation suggests that /inst/doc
are to be used for pre-compiled and heavy vignettes. However, that do not agree very well with the new guidelines on using /vignettes
for package vignettes (or what?).
Currently, I've placed my source files in /vignettes
and I create an .RData
file which contains the most computationally expensive objects (and which is also quite large). The scripts then check if the objects are available through that .RData
file, if not, the objects are created. So to compile and run completely from scratch, the .RData
file can simply be deleted.
Do anyone have some experience or pointers regarding this problem?
Should the vignette be in /vignettes
or /inst/doc
?
If the former is preferred, where do I place the needed files such as .bib
, .RData
, etc.?
I must admit I find the /vignettes
vs /inst/doc
somewhat confusing.
data
. Then in the vignette you puteval = FALSE
and load the data under the hood. – Unabridged