Description Usage Arguments Value Author(s) Examples
Evaluate an expression which may generate warnings. Instead of printing the often terse warning to stderr, instead catch the warnings, print them to stdout using the message mechanism.
1 | squashWarnings(expr)
|
expr |
an expression that might generate a warning |
The result of executing expression. One message is returned per warning, with each message having the form ‘WARNING: w\$message’
Mark Cowley
1 2 3 4 5 6 | # no warning or error
squashWarnings(1:5)
# warning thrown
squashWarnings(warning("My warning message"))
# errors are still thrown:
squashWarnings(log("x"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.