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

Description Usage Examples

Description

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

Usage

1
2
3
suppressWarnings(expr, classes = "warning")

suppressMessages(expr, classes = "message")

Examples

1
2
3
4
# 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")

backports documentation built on Dec. 13, 2021, 5:08 p.m.