is_data_frame | R Documentation |
Checks if the passed entity is a data frame.
is_data_frame(
df,
exact_rownames = NULL,
exact_colnames = NULL,
required_rownames = NULL,
required_colnames = NULL,
allow_null = FALSE
)
df |
the entity that might be a data frame |
exact_rownames |
vector of strings that, if passed, add the requirement for the data frame to contain *exactly* the named rows. Note that if a name has NULL assigned to it, it counts as not present. |
exact_colnames |
as required_rownames, but for column names. |
required_rownames |
vector of strings that, if passed, add the requirement for the data frame to contain *at least* those named rows, respectively. Note that if a name has NULL assigned to it, it counts as not present. If exact_rownames is present, this option is ignored. |
required_colnames |
as required_rownames, but for column names |
allow_null |
if TRUE, NULL is accepted as a valid value. If FALSE (default) do not accept it. |
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_data_frame(my_parameter))
# For check
if (qscheck::is_data_frame()) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.