Skip to content

Commit

Permalink
Fixes bug in conversion of type dates
Browse files Browse the repository at this point in the history
  • Loading branch information
vwmaus committed Oct 11, 2022
1 parent cb685b3 commit 2f60b06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/resampleTimeSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ setMethod("resampleTimeSeries", "twdtwTimeSeries",
})

resampleTimeSeries.twdtwTimeSeries = function(x, length){
labels = as.character(labels(x))
#labels = as.character(labels(x))
dates = index(x)
freq = as.numeric(diff(range(dates)))/(length-1)
freq = trunc(as.numeric(diff(range(dates)))/(length-1))
timeline = seq(min(dates, na.rm = TRUE), max(dates, na.rm = TRUE), by=freq)
zoo(data.frame(na.spline(x, xout = timeline)), timeline)
}
Expand Down

0 comments on commit 2f60b06

Please sign in to comment.