R/utils_warn.R

Defines functions warn_once

warn_once <- function(msg, id) {
    id <- paste0("modelsummary_warning_", id)
    msg <- paste(msg, "This warning appears once per session.")
    if (isTRUE(getOption(id, default = TRUE))) {
        warning(msg, call. = FALSE)
        opts <- list(FALSE)
        names(opts) <- id
        options(opts)
    }
}

Try the modelsummary package in your browser

Any scripts or data that you put into this service are public.

modelsummary documentation built on Oct. 15, 2023, 5:06 p.m.