check_class | R Documentation |
Check if argument is of proper class.
check_class(x, arg_class, alt_null = FALSE, add_msg = NULL)
x |
Function argument that is being asserted. |
arg_class |
Class name. Usually "character", "numeric", "data.frame", etc. |
alt_null |
Logical. Should argument accept NULL value. |
add_msg |
Is an additional message that can be printed over the standard function error message. You can:
|
If argument class
is same as arg_class
it returns invisible
NULL
. Otherwise the function throws an error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.