| catchWarning | R Documentation | 
This function evaluates an expression and returns, if warnings occurred, the warning message in the attribute "warningMessage" of the returned object.
catchWarning(expr, dbg = TRUE)
| expr | expression to be evaluated | 
| dbg | if  | 
catchWarning(as.numeric("1.23"))
result <- catchWarning(as.numeric("x"))
result <- catchWarning(as.numeric("x"), dbg = FALSE)
str(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.