Skip to content

Commit

Permalink
fix: refresh line changing
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed Dec 16, 2022
1 parent 0f1279f commit 0dcdcdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/R/refresh.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ robyn_refresh <- function(json_file = NULL,
if (TRUE) {
InputCollectRF$refreshAddedStart <- as.Date(InputCollectRF$window_end) + InputCollectRF$dayInterval
totalDates <- as.Date(dt_input[, InputCollectRF$date_var][[1]])
refreshStartWhich <- InputCollectRF$rollingWindowStartWhich <- which.min(abs(difftime(totalDates, refreshStart, units = "days")))
refreshEndWhich <- InputCollectRF$rollingWindowEndWhich <- which.min(abs(difftime(totalDates, refreshEnd, units = "days")))
refreshStart <- InputCollectRF$window_start <- as.Date(InputCollectRF$window_start) + InputCollectRF$dayInterval * refresh_steps
refreshStartWhich <- InputCollectRF$rollingWindowStartWhich <- which.min(abs(difftime(totalDates, refreshStart, units = "days")))
refreshEnd <- InputCollectRF$window_end <- as.Date(InputCollectRF$window_end) + InputCollectRF$dayInterval * refresh_steps
refreshEndWhich <- InputCollectRF$rollingWindowEndWhich <- which.min(abs(difftime(totalDates, refreshEnd, units = "days")))
InputCollectRF$rollingWindowLength <- refreshEndWhich - refreshStartWhich + 1
}

Expand Down

0 comments on commit 0dcdcdd

Please sign in to comment.