knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Basically there are three steps, each of which are described in detail below:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.