#' Wrap an object as the output of an \code{explain} function
#'
#' @param x
explainr_output <- function(x) {
# trim whitespace
x <- stringr::str_trim(x)
x <- knitr::asis_output(x)
class(x) <- c("explainr_output", class(x))
x
}
#' Print explainr output
#'
#' @param x
print.explainr_output <- function(x) {
cat(x, sep = "\n")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.