Closed mbannert closed 5 years ago
Exactly.
For some reason zoo::na.trim
shifts yearly ts
objects one period into the future. This is because internally it uses as.zoo
on them and this happens:
# Yearly series are the issue
zoo::as.zoo(ts(1:4,
start = 2018+11/12,
end = 2021+11/12,
frequency = 1))
#> 2019 2020 2021 2022
#> 1 2 3 4
Easy fix:
@HomoCodens didn't you state in another issue / PR lately we shouldn't use na.trim in the package for some reason or do I mix things up here? I just raise this here, because when I account for this issue here, I'd like to use the state-of-the-art na trimmer :)