powered by
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 )
Invisibly returns TRUE if validation passes; throws an error otherwise.
TRUE
Data to validate
Name of the dataset (for error messages)
Required column names
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
temp_data <- data.frame(Day = 1:10, Temperature = 15:24) isTRUE(validate_time_series_data(temp_data, "temperature", c("Day", "Temperature")))
Run the code above in your browser using DataLab