Skip to content

Commit

Permalink
sanitised merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gisler committed Jun 29, 2020
1 parent b88ddcb commit 82f4ee2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion R/ClassDTSg.R
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,21 @@ DTSg <- R6Class(
return(TS$merge(y = y, ... = ..., clone = FALSE))
}

private$.values <- merge(
values <- merge(
private$.values,
y$values(TRUE),
...
)
len <- private$determineLen(nrow(values))
assertPOSIXct(
values[[".dateTime"]][seq_len(len)],
any.missing = FALSE,
min.len = 1L,
unique = TRUE,
.var.name = sprintf('self$values(reference = TRUE)[[".dateTime"]][seq_len(%s)]', len)
)

private$.values <- values

self$refresh()
self$alter(clone = FALSE)
Expand Down

0 comments on commit 82f4ee2

Please sign in to comment.