powered by
Specialized validator for temperature values with realistic ranges.
validate_temperature( value, param_name, strategy = "warn", min_temp = -5, max_temp = 45 )
An object of class fb4_validation (see
fb4_validation
validation_result). valid is TRUE when all values are finite and lie within [min_temp, max_temp]. Values outside the range are recorded in warnings by default (strategy = "warn").
validation_result
valid
TRUE
[min_temp, max_temp]
warnings
strategy = "warn"
Temperature value(s) in Celsius
Parameter name
Handling strategy
Minimum realistic temperature (default -5°C)
Maximum realistic temperature (default 45°C)
validate_temperature(15, "water_temp") validate_temperature(c(5, 12, 18), "temperatures")
Run the code above in your browser using DataLab