assert_integerish | R Documentation |
Check if an argument is vector of type integer.
assert_integerish(
x,
tol = sqrt(.Machine$double.eps),
lower = -Inf,
upper = Inf,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
sorted = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE,
.var.name = checkmate::vname(x),
comment = NULL,
add = NULL
)
x |
[ |
tol |
[ |
lower |
[ |
upper |
[ |
any.missing |
[ |
all.missing |
[ |
len |
[ |
min.len |
[ |
max.len |
[ |
unique |
[ |
sorted |
[ |
names |
[ |
typed.missing |
[ |
null.ok |
[ |
.var.name |
[ |
comment |
[ |
add |
[ |
The assertions are based on checkmate::checkIntegerish
. NVIcheckmate::assert_integerish
differs from checkmate::assert_integerish
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_Integerish
return x
invisibly, whereas
check_Integerish
return TRUE
.
If the check is not successful,
assert_Integerish
throws an error message and
check_Integerish
returns a string with the error message.
If the check is successful, the function
assert_integerish
return x
invisibly.
If the check is not successful,
assert_integerish
throws an error message.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.