abort_bad_argument | R Documentation |
This function appears in Advanced R Chapter 8.5.2 Signalling https://adv-r.hadley.nz/conditions.html#signalling It was presumably written by Hadley Wickham. Generates a helpful error message and passes it to rlang::abort. Does not determine argument validity. Use this function inside a statement which determines that an input is invalid. Is adapted with extremely minor modifications from
abort_bad_argument(arg, must, not = NULL)
arg |
the invalid function argument |
must |
what a valid argument must be (e.g "numeric", or "all_models") |
not |
what a valid argument cannot be (e.g. "character" or "adlkfm_modelz") |
an error. prints the custom message to the console.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.