#' p is a plot (usually made by ggplot() call)
#' ofile is a string with relative path and name, must end in .png
#' @export
save_plot <- function(p, ofile) {
png(file = ofile, width = 1536, height = 864)
print(p)
dev.off()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.