This function is used to detect any numeric values from a string.
Value
A Boolean value or a stop message if stop_message=TRUE:
- TRUE
If any of the specified numeric type value is presented.
- FALSE
Otherwise
See also
Other checks function:
check_colnames()
,
check_duplicate_records()
,
check_is_logical()
,
check_value_match()
,
detect_decimal_value()
,
is_datadict_tbl()
Examples
if (FALSE) { # \dontrun{
string1 <- c("-2", "1", "1", "-1")
string2 <- c("ADNI1", "ADNI2", "ADNIGO")
detect_numeric_value(value = string1, num_type = "any")
detect_numeric_value(value = string2, num_type = "any")
detect_numeric_value(value = string1, num_type = "negative")
detect_numeric_value(value = string1, num_type = "positive", stop_message = TRUE)
} # }