Description Usage Arguments Value Author(s) Examples
Checks if an argument is a data frame and (optionally) whether is contains a set of required variables
1 | assert_data_frame(arg, required_vars = NULL, optional = FALSE)
|
arg |
A function argument to be checked |
required_vars |
A list of variables created using |
optional |
Is the checked parameter optional? If set to |
The function throws an error if arg
is not a data frame or if arg
is a data frame but misses any variable specified in required_vars
. Otherwise,
the input is returned invisibly.
Thomas Neitmann
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.