Skip to content

Commit

Permalink
Fixed error "Error in as.POSIXct.numeric(e) : 'origin' must be supplied"
Browse files Browse the repository at this point in the history
  • Loading branch information
gisler committed May 7, 2020
1 parent e42a955 commit 1eff5a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: DTSg
Type: Package
Title: A Class for Working with Time Series Based on 'data.table' and 'R6' with
Largely Optional Reference Semantics
Version: 0.4.0.9000
Version: 0.4.1
Authors@R: person("Gerold", "Hepp", email = "ghepp@iwag.tuwien.ac.at", role = c("aut", "cre"))
Description: Basic time series functionalities such as listing of missing
values, application of arbitrary aggregation as well as rolling window
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## DTSg v0.4.0.9000
## DTSg v0.4.1

* Fixed error "Error in as.POSIXct.numeric(e) : 'origin' must be supplied" for upcoming R 4.1.0
* Slightly improved vignettes
* Minor internal code improvements

Expand Down
14 changes: 8 additions & 6 deletions R/rollback.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ rollback <- function(.dateTime, periodicity) {
.dateTime <- structure(
c(
.dateTime[1L],
mapply(
rollToEndOfPreviousMonth,
lags = lags,
.dateTime = .dateTime[-1L],
MoreArgs = list(clause = clause, periodicity = periodicity)
do.call(
c,
Map(
rollToEndOfPreviousMonth,
lags = lags,
.dateTime = .dateTime[-1L],
MoreArgs = list(clause = clause, periodicity = periodicity)
)
)
),
class = class(.dateTime),
tzone = attr(.dateTime, "tzone")
)
}
Expand Down

0 comments on commit 1eff5a5

Please sign in to comment.