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
)Validation result with potentially modified value
Value(s) to validate
Parameter name for error messages
Whether the parameter is required (cannot be NULL)
Whether NA values are allowed
Whether infinite values are allowed
Minimum allowed value (optional)
Maximum allowed value (optional)
Handling strategy: "strict", "clamp", "replace", "warn"
Default value for "replace" strategy
Whether value must be integer