Skip to content
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

as.period seconds error #320

Closed
init-random opened this issue Apr 28, 2015 · 2 comments
Closed

as.period seconds error #320

init-random opened this issue Apr 28, 2015 · 2 comments

Comments

@init-random
Copy link

This looks like #284, which is closed but I see the following error with lubridate 1.3.3.

library(lubridate)

a <- ymd_hms("2014-12-02 00:59:49 UTC"); b <- ymd_hms("2014-12-02 01:00:00 UTC")
as.period(new_interval(a, b), unit='hours') # fine
[1] "11S"
as.period(new_interval(a, b), unit='seconds')
Error in while (any(start + est * per < end)) est[start + est * per < :
missing value where TRUE/FALSE needed
traceback()
11: adjust(estimate, int, per)
10: divide_interval_by_period(e1, e2)
9: e1/e2
8: e1/e2
7: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
6: suppressMessages(e1/e2)
5: integer_divide_spans(e1, e2)
4: x%/%per(1)
3: x%/%per(1)
2: as.period(new_interval(a, b), unit = "seconds")
1: as.period(new_interval(a, b), unit = "seconds")

@vspinu
Copy link
Member

vspinu commented Apr 28, 2015

It's fixed in master.

> a <- ymd_hms("2014-12-02 00:59:49 UTC")
> b <- ymd_hms("2014-12-02 01:00:00 UTC")
> as.period(new_interval(a, b), unit='seconds')
[1] "11S"
> 

CRAN version is a bit outdated.

@vspinu vspinu closed this as completed Apr 28, 2015
@init-random
Copy link
Author

Yes, sorry. I just installed 1.4 from git where it is working fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants