Convert to an HTML vignette

A HTML vignette is a lightweight alternative to html_document suitable for inclusion in packages to be released to CRAN. It reduces the size of a basic vignette from 100k to around 10k.

html_vignette(fig_width = 3, fig_height = 3, dev = "png",
  df_print = "default", css = NULL, keep_md = FALSE,
  readme = FALSE, ...)

Default width (in inches) for figures


Default height (in inches) for figures


Graphics device to use for figure output (defaults to png)


Method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". The "default" method uses The "kable" method uses the knitr::kable function. The "tibble" method uses the tibble package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option rmarkdown.df_print to FALSE.


One or more css files to include


Keep the markdown file generated by knitting.


Use this vignette as the package file (i.e. render it as to the package root). Note that if there are image files within your vignette you should be sure to add README_files to .Rbuildignore


Additional arguments passed to html_document. Please note that theme, fig_retina and highlight are hard coded. Setting any of those will yield an error.


Compared to html_document, it:

  • never uses retina figures

  • never uses a theme

  • has a smaller default figure size

  • uses a custom css stylesheet

  • uses a custom highlight scheme

See the online documentation for additional details on using the html_vignette format.


R Markdown output format to pass to render

  • html_vignette
Documentation reproduced from package rmarkdown, version 1.12, License: GPL-3

Community examples

Looks like there are no examples yet.