Using a static (prebuilt) PDF vignette in R package
With R.rsp (>= 1.19.0) you can include a static PDF 'vignettes/main.pdf' by adding a tiny 'vignettes/main.pdf.asis' text file that contains:
%\VignetteIndexEntry{My amazing package}
%\VignetteEngine{R.rsp::asis}
and make sure to have:
Suggests: R.rsp
VignetteBuilder: R.rsp
in your package's DESCRIPTION file. This also works for static HTML vignettes. This is also explained in one of the R.rsp vignettes.
Can I have R vignette with a pre-compiled PDF with manual index.html show up the vignette list?
Right after Yihui....
Make a fake Rnw that looks like this:
%\VignetteIndexEntry{User manual}
\documentclass{article}
\begin{document}
\end{document}
And put it in inst/doc
along side your precompiled vignette and you will be all set.
How do I 'prebuild' a vignette index for an R package?
I gather the Vignette
commands need to be in the preamble, i.e. below documentclass
, so that the file myVignette.Rnw
should read:
\documentclass{article}
% \VignetteIndexEntry{myVignette}
% \VignetteEngine{knitr::knitr}
\usepackage[]{graphicx}
...
This seems to work fine.
The error message is from the development version of R CMD check
which is currently 3.3.0
. I have been using the older 'stable' version which is not the recommended way to check packages when considering submission to CRAN.
I'm still not sure of the merits of using a manual index.html
file - it appears unnecessary but I will gladly change the accepted answer if anyone can throw some light on this.
Related Topics
Ggplot Geom_Point() with Colors Based on Specific, Discrete Values
Change Color of Leaflet Marker
How to Add an Inset (Subplot) to "Topright" of an R Plot
Reading Hdf Files into R and Converting Them to Geotiff Rasters
R: Losing Column Names When Adding Rows to an Empty Data Frame
Adjusting Width of Tables Made with Kable() in Rmarkdown Documents
Simple Frequency Tables Using Data.Table
How Can Put Multiple Plots Side-By-Side in Shiny R
How to Break Out of a Foreach Loop
Mgcv: How to Set Number And/Or Locations of Knots for Splines
Ggplot2 Theme with No Axes or Grid
How to Print R Variables in Middle of String
Extracting Coefficient Variable Names from Glmnet into a Data.Frame
How to Add Another Layer/New Series to a Ggplot
Shiny App: Nothing Changes When Clicking on Action Button