knitr::opts_chunk$set(echo = TRUE)
Add roxygen comments to your .R files.
Run devtools::document() (or press Ctrl/Cmd + Shift + D in RStudio) to convert roxygen comments to .Rd files. (devtools::document() calls roxygen2::roxygenise() to do the hard work.)
Preview documentation with ?.
Rinse and repeat until the documentation looks the way you want.
devtools::load_all(".") devtools::document()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.