warn_any_na <- function(x, warning = "some values were coerced to NA's"){
if(any(is.na(x))){warning(warning)}
}
warn_any_logic <- function(x,operator,value, warning){
if(any(operator(na.omit(x),value))){warning(warning)}
}
warn_any_zero <- function(x,warning = "at least one value = 0"){
warn_any_logic(x = x,operator = `==`,value = 0,warning = warning)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.