check_timeseries {RtsEva} | R Documentation |
This function checks if all years specified in a given time series are present.
check_timeseries(timeseries, yro)
timeseries |
A time series object. |
yro |
A vector specifying the start and end years. |
A logical value indicating whether all years in the time series are present.
ts_data <- seq(as.POSIXct("2000-01-01"), as.POSIXct("2004-12-31"), by = "year")
check_timeseries(ts_data, c(2000, 2004))
# Output: TRUE
check_timeseries(ts_data, c(2000, 2005))
# Output: FALSE