View source: R/11.1-basic-validators.R
| validate_time_series_data | R Documentation |
Basic validation of time series data structure and content for use in FB4 simulations.
validate_time_series_data(
data,
data_name,
required_cols = NULL,
min_cols = NULL
)
data |
Data to validate |
data_name |
Name of the dataset (for error messages) |
required_cols |
Required column names |
min_cols |
Minimum number of columns |
Performs comprehensive validation including:
Structure validation (data.frame, non-empty)
Required column presence
Day column validation (numeric, finite, ascending)
Duplicate detection
Invisibly returns TRUE if validation passes; throws an error otherwise.
temp_data <- data.frame(Day = 1:10, Temperature = 15:24)
isTRUE(validate_time_series_data(temp_data, "temperature", c("Day", "Temperature")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.