Description Usage Arguments Functions Examples
This collection of functions allow the suppression of condition messages, warnings and messages, through filtering the condition message, the condition class or a combination of the two.
1 2 3 4 5 |
expr |
An expression to evaluate. |
pattern |
A regular expression pattern to match on. |
class |
The class or classes that you would like to filter. When more that one is given the condition may match any of the classes. |
... |
Arguments passed on to
|
suppress_conditions
: The general case of suppressing both messages and warnings.
suppress_warnings
: A convenience wrapper that specifies warning class to suppress.
suppress_messages
: A convenience wrapper that specifies warning class to suppress.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
testit <- function(){
warning("this function does nothing.")
warning("it's pretty useless.")
}
suppress_warning(testit(), "useless") # Will suppress only the second warning by pattern
# If my_pkg used pkgcond for conditions,
# This would suppress all messages and warnings originating
# in my_pkg functions.
suppress_conditions(my_function(), class='my_pkg-condition')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.