#' Return default value if NULL
#'
#' @param x value to check and return
#' @param d value to return in case x is NULL
#'
null_to_default <-
function(x, d){
if ( is.null(x) ){
d
}else{
x
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.