#' @export
toPDF = function(file = "plot.pdf",
openPDF = FALSE){
dev.copy2pdf(file = file,
out.type = "pdf")
if(openPDF) browseURL(file)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.