From e96fb146626056a1125238b62126ca46fad83387 Mon Sep 17 00:00:00 2001 From: Arnfinn Hykkerud Steindal Date: Thu, 16 Jan 2025 15:54:06 +0100 Subject: [PATCH] Fjernet avhengighet av pakken timeplyr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Finnes ikke på Cran for tiden --- DESCRIPTION | 1 - R/autoReport.R | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bdc142af..6211a000 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -48,7 +48,6 @@ Imports: shiny, shinyalert, sship (>= 0.9.0), - timeplyr, utils, yaml RoxygenNote: 7.3.2 diff --git a/R/autoReport.R b/R/autoReport.R index 3174456d..ddbae5ed 100644 --- a/R/autoReport.R +++ b/R/autoReport.R @@ -581,10 +581,10 @@ runAutoReport <- function(dayNumber = as.POSIXlt(Sys.Date())$yday + 1, target == "db" && as.Date(rep$startDate) <= dato && as.Date(rep$terminateDate) > dato - && dato %in% timeplyr::time_seq( + && dato %in% seq.Date( as.Date(rep$startDate), dato, - time_by = rep$interval + by = rep$interval ) # 'days', 'weeks', 'months', 'years', )) { # get explicit referenced function and call it @@ -715,10 +715,10 @@ findNextRunDate <- function(runDayOfYear, nextDate <- as.Date(startDate) } if (Sys.Date() >= startDate && Sys.Date() <= terminateDate) { - dateseq <- timeplyr::time_seq( + dateseq <- seq.Date( as.Date(startDate), as.Date(terminateDate), - time_by = interval + by = interval ) tidsdiff <- difftime(dateseq, Sys.Date(), units = "days") tidsdiff[tidsdiff <= 0] <- NA