vignette_engines | R Documentation |
Since R 3.0.0, package vignettes can use non-Sweave engines, and knitr
has provided a few engines to compile vignettes via knit()
with
different templates. See https://yihui.org/knitr/demo/vignette/ for
more information.
If you use the knitr::rmarkdown
engine, please make sure that
you put rmarkdown in the ‘Suggests’ field of your
‘DESCRIPTION’ file. Also make sure pandoc
is available
during R CMD build
. If you build your package from RStudio, this
is normally not a problem. If you build the package outside RStudio, run
rmarkdown::find_pandoc()
in an R session to check if Pandoc can be
found.
When the rmarkdown package is not installed or not available, or
pandoc
cannot be found, the knitr::rmarkdown
engine will
fall back to the knitr::knitr
engine, which uses R Markdown v1 based
on the markdown package.
library(knitr)
vig_list = tools::vignetteEngine(package = "knitr")
str(vig_list)
vig_list[["knitr::knitr"]][c("weave", "tangle")]
vig_list[["knitr::knitr_notangle"]][c("weave", "tangle")]
vig_list[["knitr::docco_classic"]][c("weave", "tangle")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.