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

Error when computing time_length in years for a missing value #388

Closed
larmarange opened this issue Mar 7, 2016 · 0 comments
Closed

Error when computing time_length in years for a missing value #388

larmarange opened this issue Mar 7, 2016 · 0 comments

Comments

@larmarange
Copy link
Contributor

Here an example:

> time_length(interval(NA,ymd("2016-01-01")))
[1] NA
> time_length(interval(NA,ymd("2016-01-01")), unit = "year")
Error in if (any(e2@year != 0)) { : missing value where TRUE/FALSE needed

The second command creates an error when NA is expected.

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

1 participant