knitr::opts_hooks$set(echoRule = function(options) {
if (options$echo == FALSE) {
options$Rrule = NULL
} else {
options$Rrule = TRUE
}
options
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.