#' Calculate deviance explained by GLM objects
#'
#' @model = name of model object (GLM)
#'
d2 <- function(model){
round(1-(model$deviance/model$null.deviance),4)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.