assert_type | R Documentation |
Check Data Types
assert_type(x, expected, allow_empty = TRUE, allow_null = FALSE)
assert_scalar(x, expected)
assert_function(x)
x |
An object to be checked. |
expected |
A |
allow_empty |
A |
allow_null |
A |
Throws an error, if any, and returns x
invisibly otherwise.
N. Frerebeau
Other checking methods:
assert_constant()
,
assert_dim()
,
assert_empty()
,
assert_infinite()
,
assert_length()
,
assert_lower()
,
assert_missing()
,
assert_names()
,
assert_numeric
,
assert_package()
,
assert_square()
,
assert_unique()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.