.simplifyWarning <- function(expr){
W <- NULL
w.handler <- function(w){ # warning handler
W <<- w
invokeRestart("muffleWarning")
}
result <- withCallingHandlers(tryCatch(expr, error = function(e) e),
warning = w.handler)
if(!is.null(W)){
warning(W)
}
return(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.