View source: R/11.0-core-validators.R
| validate_numeric_core | R Documentation |
Atomic validator for numeric values with support for different handling strategies for problematic values. Used as foundation for other numeric validation functions.
validate_numeric_core(
value,
param_name,
required = TRUE,
allow_na = FALSE,
allow_infinite = FALSE,
min_val = NULL,
max_val = NULL,
strategy = "strict",
default_value = NULL,
integer_only = FALSE
)
value |
Value(s) to validate |
param_name |
Parameter name for error messages |
required |
Whether the parameter is required (cannot be NULL) |
allow_na |
Whether NA values are allowed |
allow_infinite |
Whether infinite values are allowed |
min_val |
Minimum allowed value (optional) |
max_val |
Maximum allowed value (optional) |
strategy |
Handling strategy: "strict", "clamp", "replace", "warn" |
default_value |
Default value for "replace" strategy |
integer_only |
Whether value must be integer |
Validation result with potentially modified value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.