dot-suppressSpecificWarnings: This function allows you to suppress specific warnings and...

.suppressSpecificWarningsR Documentation

This function allows you to suppress specific warnings and was originally created by Antoine Fabri ("Moody_Mudskipper"): see https://stackoverflow.com/a/55182432/697473 Sometimes R throws warning messages that we don't want to see. The base suppressWarnings() function permits one to suppress warnings, but it is tricky to selectively suppress only certain warnings on the basis of a regular expression or another condition. This function allows one to do that.

Description

This function allows you to suppress specific warnings and was originally created by Antoine Fabri ("Moody_Mudskipper"): see https://stackoverflow.com/a/55182432/697473 Sometimes R throws warning messages that we don't want to see. The base suppressWarnings() function permits one to suppress warnings, but it is tricky to selectively suppress only certain warnings on the basis of a regular expression or another condition. This function allows one to do that.

Usage

.suppressSpecificWarnings(.expr, .f, ...)

Arguments

.expr

Expression to be evaluated.

.f

String or function. If a string (possibly representing a regular expression), any warning message generated when .expr is evaluated will be suppressed if grepl{} finds that the string matches the warning message. If a function, the warning message will be passed to the function, and the function must return TRUE or FALSE. See the examples for details.


GreenleafLab/ArchR documentation built on Feb. 21, 2025, 3:05 p.m.