[Rd] packages with Sweave and knitr vignettes?
Michael Friendly
friendly at yorku.ca
Fri Aug 23 22:24:40 CEST 2013
Now that R 3.0.0+ supports non-Sweave vignettes, R-exts \S 1.4.2 seems
to imply that
it is possible to include both Sweave and knitr vignettes in a single
package.
I'm wondering
if anyone has tried this and/or if there are some hidden gotchas putting
this into practice,
and concerned about creating problems with CRAN checks if I try this.
Consider two vignettes:
pkg/vignettes/vign1.Rnw, containing:
% !Rnw weave = Sweave
%\VignetteEngine{Sweave}
...
pkg/vignettes/vign2.Rnw, containing:
% !Rnw weave = knitr
%\VignetteEngine{knitr::knitr}
...
both are .Rnw files, distinguished only by \VignetteEngine. vign1.Rnw is
currently in my
package, and vign2.Rnw compiles OK outside it, using knitr in an R
console or RStudio.
R-exts implies that the DESCRIPTION file must include (minimally):
VignetteBuilder: Sweave, knitr
Suggests: knitr
Is anything more/different required? Does a package exist that does this?
TIA
-Michael
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street Web: http://www.datavis.ca
Toronto, ONT M3J 1P3 CANADA
More information about the R-devel
mailing list