An R HTML vignette with knitr

This is an R HTML vignette. The file extension is `*.Rhtml`, and it has to include a special comment to tell R that this file needs to be compiled by knitr:

    <!--
    %\VignetteEngine{knitr::knitr}
    %\VignetteIndexEntry{The Title of Your Vignette}
    -->

Now you can write R code chunks:

You can also embed plots, for example:

For package vignettes, you need to encode images in base64 strings using the `knitr::image_uri()` function so that the image files are no longer needed after the vignette is compiled. For example, you can add this chunk in the beginning of a vignette: