assert_data_frame | R Documentation |
Check if an argument is vector of type data frame.
assert_data_frame(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE,
.var.name = checkmate::vname(x),
comment = NULL,
add = NULL
)
x |
[ |
types |
[ |
any.missing |
[ |
all.missing |
[ |
min.rows |
[ |
max.rows |
[ |
min.cols |
[ |
max.cols |
[ |
nrows |
[ |
ncols |
[ |
row.names |
[ |
col.names |
[ |
null.ok |
[ |
.var.name |
[ |
comment |
[ |
add |
[ |
The assertions are based on
checkmate::check_data_frame
.
NVIcheckmate::assert_data_frame
differs from
checkmate::assert_data_frame
in including the argument comment
. The help
is updated to reflect the changes.
This function does not distinguish between
NA
, NA_integer_
, NA_real_
, NA_complex_
NA_character_
and NaN
.
Depending on the function prefix:
If the check is successful, the function
assert_Integer
return x
invisibly, whereas
check_Integer
return TRUE
.
If the check is not successful,
assert_Integer
throws an error message and
check_Integer
returns a string with the error message.
If the check is successful, the function
assert_data_frame
return x
invisibly.
If the check is not successful,
assert_data_frame
throws an error message.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.