View source: R/11.0-core-validators.R
| validate_temperature | R Documentation |
Specialized validator for temperature values with realistic ranges.
validate_temperature(
value,
param_name,
strategy = "warn",
min_temp = -5,
max_temp = 45
)
value |
Temperature value(s) in Celsius |
param_name |
Parameter name |
strategy |
Handling strategy |
min_temp |
Minimum realistic temperature (default -5°C) |
max_temp |
Maximum realistic temperature (default 45°C) |
An object of class fb4_validation (see
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").
validate_temperature(15, "water_temp")
validate_temperature(c(5, 12, 18), "temperatures")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.