I am writing an R package with this vignette title:
---
title: "Adaptive non-parametric learning"
author: "..."
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Adaptive non-parametric learning}
%\VignetteEngine{knitr::rmarkdown_notangle}
%\VignetteEncoding{UTF-8}
---
I added rmarkdown_notangle
to avoid running the vignette on CRAN, as the full vignette will take an hour to run (even though now I am testing and it takes 2 minutes).
I compile the package with:
Rscript -e "devtools::document();devtools::check();devtools::build();devtools::install();"
The output shows:
...
─ installing the package to build vignettes
✔ creating vignettes (1m 48.8s)
...
✔ checking files in ‘vignettes’ ...
...
✔ checking for unstated dependencies in vignettes ...
✔ checking package vignettes in ‘inst/doc’
✔ checking re-building of vignette outputs (1m 47.9s)
...
─ installing the package to build vignettes
✔ creating vignettes (1m 49.5s)
...
** installing vignettes
** testing if installed package can be loaded
* DONE (PosteriorBootstrap)
Reloading attached PosteriorBootstrap
But the doc/
directory is empty, the inst/doc
directory does not exist, and when I import the package, no vignettes are installed:
> library(PosteriorBootstrap)
> browseVignettes(package="PosteriorBootstrap")
No vignettes found by browseVignettes(package = "PosteriorBootstrap")
> vignette("Adaptive Non-parametric learning")
Warning message:
vignette ‘Adaptive Non-parametric learning’ not found
I found this thread that suggests using %\VignetteEngine{knitr::rmarkdown}
, which I use, and install_github(..., build_vignettes=TRUE)
, which I don't since I build it locally.
Where is the vignette output?