New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interval Inconsistency #584

feyziemreoral opened this Issue Oct 6, 2017 · 1 comment


None yet
2 participants

feyziemreoral commented Oct 6, 2017


I'm new to GitHub.

I just noticed that the interval function is giving some unexpected results...

interval('2015-03-01', '2016-10-01') / months(1)
[1] 19
interval('2015-03-02', '2016-10-01') / months(1)
[1] 19.47541
interval('2015-03-03', '2016-10-01') / months(1)
[1] 18.93333

I would expect the output of the middle function to be between the first and third.

If I change the end period to 2015 I get what I would expect...

interval('2015-03-01', '2015-10-01') / months(1)
[1] 7
interval('2015-03-02', '2015-10-01') / months(1)
[1] 6.966667
interval('2015-03-03', '2015-10-01') / months(1)
[1] 6.933333

Am I missing something?


This comment has been minimized.


vspinu commented Oct 6, 2017

It's probably a bug. Division by month is rather flimsy.

@vspinu vspinu added the bug label Oct 6, 2017

vspinu added a commit that referenced this issue Oct 7, 2017

[#584] Fix interval by period division
 ... and broken replication therein

@vspinu vspinu closed this in 2c38627 Oct 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment