suppressWarnings: Backport of suppressWarnings and suppressMessages for R <...

suppressWarningsR Documentation

Backport of suppressWarnings and suppressMessages for R < 4.0.0

Description

Backport for new argument 'classes'. See the original description in base::suppressWarnings/base::suppressMessages.

Usage

suppressWarnings(expr, classes = "warning")

suppressMessages(expr, classes = "message")

Examples

# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_suppressWarnings = getFromNamespace("suppressWarnings", "backports")
bp_suppressWarnings(warningCondition("warning", class = "testWarning"), "testWarning")

mllg/backports documentation built on March 15, 2023, 8:07 p.m.