Create the file
example.Rmd in your current working directory.
This R Markdown files contains example code chunks that can be converted to
interactive R playgrounds.
Open the file after building the example?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.