View source: R/check_helpers.R
check_numeric | R Documentation |
This function checks a numeric vector for invalid values. It identifies indices of elements that are infinite, negative, NA (if not allowed), or zero (if not allowed). It is used internally in the package to validate numeric columns that are expected to contain valid non-negative numbers.
check_numeric(col, allow_na = FALSE, allow_zero = FALSE)
col |
a numeric vector to be checked for invalid values. |
allow_na |
logical value indicating whether NA values are allowed. Default is FALSE. |
allow_zero |
logical value indicating whether zero values are allowed. Default is FALSE. |
a vector of indices where the numeric values are invalid (i.e., infinite, negative, NA, or zero if not allowed).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.