This is an example R package I created for my blog post here.
You can install this package in R with the command devtools::install_github("albertkuo/mypackage")
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.