globalgov / messydates

R package for Extended Date/Time Format (EDTF)
https://globalgov.github.io/messydates
Other
15 stars 1 forks source link

Update resolve() mean to work with negative dates #39

Closed henriquesposito closed 2 years ago

henriquesposito commented 2 years ago

Because resolve for mean method works with as.Date() it does not handle negative dates for now.

One possible way is to get the median for negative date ranges ...

jhollway commented 2 years ago

Why not convert them to some set of integers, take the mean of that, then convert back to a (negative) date as required?

henriquesposito commented 2 years ago

Yes, thank you, that is what I will do.