| assert_has_cols | R Documentation |
Checks to see if the input has rows/columns.
assert_has_cols(x, severity = getOption("assertive.severity", "stop"))
assert_has_rows(x, severity = getOption("assertive.severity", "stop"))
has_cols(x, .xname = get_name_in_parent(x))
has_rows(x, .xname = get_name_in_parent(x))
x |
Input to check. |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
has_rows and has_cols return TRUE if
nrow and ncol respectively return a value that is
non-null and positive. The assert_* functions return nothing
but throw an error if the corresponding has_* function returns
FALSE.
ncol.
assert_has_rows(data.frame(x = 1:10)) assert_has_cols(matrix())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.