warnUser | R Documentation |
Declares a warning to be of class "userWarning", to distinguish between warnings we programmed into the system (e.g. "Found extra meta data") and errors R gives (e.g. "argument has length >1")
warnUser(message)
message |
The warning message that the user should see |
Adds the class "userWarning" to the warning object.
All helpful errors should be thrown using warnUser
. Any warning
thrown using warning
will be treated as an internal warning by the simple
experiment loader.
When using this function, it is important to give it a single string as a message.
This means using paste. While warning("text ", variable, " text")
is okay syntax,
you will get an error if you try warnUser("text ", variable, " text")
. Use paste0
instead: warnUser(paste0("text ", variable, " text"))
(note that this syntax is also
perfectly acceptable inside warning
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.