'Panel Data Split in R (time series)

I am trying to perform panel data split on time series data with the following code

FORECAST_HORIZON <- "2 years"
splits <- data_prepared_tbl %>%
  time_series_split(
    date_var   = date,
    assess     = FORECAST_HORIZON,
    cumulative = TRUE
  )

I counted the number of rows of the data and it is 3772 which is more than 3250. However, I am getting the following errors and messages.

Data is not ordered by the 'date_var'. Resamples will be arranged by date. Overlapping Timestamps Detected. Processing overlapping time series together using sliding windows. Error: There should be at least 3250 nrows in data



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source