Description Usage Arguments Examples
checking_args can make checks more readable and avoid defining temporary variables
1 | checking_args(.check, .message = NULL)
|
.check |
an expression that should be |
.message |
An error message, falls back on a default message if NULL |
1 2 3 4 5 6 | ## Not run:
mean(1:5, na.rm = 1)
checking_args(is.logical(na.rm))$mean(1:5, na.rm = 1)
checking_args(is.logical(na.rm),"na.rm should be logical!")$mean(1:5, na.rm = 1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.