#' Avertissement
#'
#' Permet de prédire si une expression renvoie un avertissement ou non.
#'
#' @param expr Fonction ou code. Si plusieurs lignes de code, mettre entre accolades `{}`.
#'
#' @return TRUE/FALSE
#' @importFrom testthat capture_warning
#' @export
is_warning <- function(expr){
warn <- capture_warning(expr)
if(is.null(warn)) return(FALSE) else return(TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.