is_function | R Documentation |
Checks if the value is a function
is_function(value, num_args = NULL, args = NULL, allow_null = FALSE)
value |
the value to check |
num_args |
an integer. If defined, the function must have the exact number of arguments. |
args |
a vector of strings. If defined, the function must have the exact argument names, in the specified order. |
allow_null |
if TRUE, allow the value NULL. If FALSE (default) do not allow NULL. |
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_function(f))
# For check
if (qscheck::is_function(f)) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.