# 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