-
Notifications
You must be signed in to change notification settings - Fork 7
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
nanotime(NA) should not return a nanotime #26
Comments
It's actually most likely a formatting issue, but > is.na(nanotime(NA))
[1] TRUE
attr(,".S3Class")
[1] "integer64"
attr(,"class")
[1] "nanotime"
attr(,"class")attr(,"package")
[1] "nanotime" |
Ditto for other non-finite values it seems: R> nanotime(c(-Inf, NA, NaN, Inf))
[1] "1677-09-21T00:12:43.145224192+00:00" "1677-09-21T00:12:43.145224192+00:00"
[3] "1677-09-21T00:12:43.145224192+00:00" "1677-09-21T00:12:43.145224192+00:00"
Warning message:
In as.integer64.double(x, keep.names = TRUE) :
NAs produced by integer64 overflow
R> The warning comes from the |
Yes, you are right, we need to take care of these other cases too. I'll get a patch together for that. |
Now fixed: R> nanotime(c(-Inf, NA, NaN, Inf))
[1] NA NA NA NA
Warning message:
In as.integer64.double(x, keep.names = TRUE) :
NAs produced by integer64 overflow
R> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: