Description Usage Arguments Details Author(s) Examples
If the condition
is TRUE
,
generate error/warning/message from the supplied message.
1 2 3 4 5 |
condition |
The condition to check. (Logical) |
message |
Message. (Character) Note: If |
sys.parent.n |
The number of generations to go back when calling message function. |
When condition
is FALSE
, they return NULL
invisibly.
When condition
is TRUE
:
Throws error with the supplied message.
Throws warning with the supplied message.
Generates message with the supplied message.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
1 2 3 4 5 6 7 | # Attach packages
library(rtilities2)
a <- 0
stop_if(a == 0, "'a' cannot be 0.")
warn_if(a == 0, "'a' was 0.")
message_if(a == 0, "'a' was so kind to be 0.")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.