Closed mirt001 closed 3 years ago
Not a bug, you are converting the dates imprecisely:
> lubridate::date_decimal(mon$breakpoint)
[1] "2018-06-11 00:00:00 UTC"
just for the reference, the correct formula without needing a package is:
doy <- (mon$breakpoint-year) * 365 + 1
because calendars use 1 based indexing, so 2018.000 is 1st of January, and not 0th of Zerouary
The following code gives the output 2018,161 , which means 2018-06-10, which is not in the list of dates, although the next day of 2018-06-11 is in the list of dates.
Breaks should only be possibly detected in one of the observation dates.
2018 161