#' Print Plot
#'
#' Function to use an print_plot(gp) in place of print(gp) as catches error and retries.
#'
#' @param x The plot object to plot.
#' @export
print_plot <- function (x) {
if (inherits(try(print(x), silent = TRUE), "try-error"))
try(print(x))
invisible(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.