View source: R/util_is_numeric_in.R
util_is_numeric_in | R Documentation |
useful, e.g., for util_expect_data_frame and util_expect_scalar. The
generated function returns on TRUE
or FALSE
, even if called with a
vector.
util_is_numeric_in(
min = -Inf,
max = +Inf,
whole_num = FALSE,
finite = FALSE,
set = NULL
)
min |
if given, minimum for numeric values |
max |
if given, maximum for numeric values |
whole_num |
if TRUE, expect a whole number |
finite |
Are |
set |
if given, a set, the value must be in (see util_match_arg) |
a function that checks an x
for the properties.
Other robustness_functions:
util_as_valid_missing_codes()
,
util_check_one_unique_value()
,
util_correct_variable_use()
,
util_empty()
,
util_ensure_character()
,
util_ensure_in()
,
util_ensure_suggested()
,
util_expect_scalar()
,
util_fix_rstudio_bugs()
,
util_is_integer()
,
util_is_valid_missing_codes()
,
util_match_arg()
,
util_observations_in_subgroups()
,
util_only_NAs()
,
util_stop_if_not()
,
util_warn_unordered()
## Not run:
util_is_numeric_in(min = 0)(42)
util_is_numeric_in(min = 43)(42)
util_is_numeric_in(max = 3)(42)
util_is_numeric_in(whole_num = TRUE)(42)
util_is_numeric_in(whole_num = TRUE)(42.1)
util_is_numeric_in(set = c(1, 3, 5))(1)
util_is_numeric_in(set = c(1, 3, 5))(2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.