knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
A standard R dataset .R file looks like this (https://r-pkgs.org/data.html)
"diamonds"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.