Skip to content

Commit

Permalink
fix: issue with Date objects
Browse files Browse the repository at this point in the history
  • Loading branch information
MMenchero committed Oct 18, 2024
1 parent 4baabe3 commit 05bfff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/nixtla_client_cross_validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ nixtla_client_cross_validation <- function(df, h=8, freq=NULL, id_col="unique_id
window_starts <- seq(0, sum(unlist(resp$sizes)) - 1, by = h)
cutoff_idxs <- rep(idxs[window_starts + 1] - 1, each = h)
cutoff_dates <- df$ds[unique(cutoff_idxs)]
cutoff <- unlist(lapply(cutoff_dates, function(i) {rep(i, times = h)}))
cutoff <- do.call(c, sapply(cutoff_dates, function(i) rep(i, times = h), simplify = FALSE))
cutoff <- as.POSIXct(cutoff)

dt <- data.frame(
Expand Down

0 comments on commit 05bfff5

Please sign in to comment.