Selectively muffle warnings based on output
hushWarning(expr, regexp)
Arguments
- expr
an expression
- regexp
a regexp to be matched (with str_detect)
Examples
hushWarning(warning('Beware the rabbit'), 'rabbit')
hushWarning(warning('Beware the rabbit'), 'hedgehog')
#> Warning: Beware the rabbit