#' Check that all probabilities are positive
#'
#' @param probs vector of probabilities for a single forecast
#'
#' @return TRUE or error message
#'
check_probs_gt0 <- function(probs) {
if (all(probs >= 0)) TRUE
else "there are negative probabilities"
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.