Learn R Programming

backports (version 1.5.0)

suppressWarnings: 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")

Arguments

Examples

Run this code
# 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")

Run the code above in your browser using DataLab