#' @noRd
coerce_nans <- function(x, to){
 UseMethod('coerce_nans')
}
#' @noRd
coerce_nans.list <- function(x, to){
 lapply(x, coerce_nans, to = to)
}
#' @noRd
coerce_nans.factor <-
 coerce_nans.integer <-
 coerce_nans.double <-
 coerce_nans.array <-
 coerce_nans.matrix <- function(x, to){
 if(any(is.nan(x))){
  x[is.nan(x)] <- to
 }
 x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.