{"action":"closed","issue":{"url":"https://api.github.com/repos/hadley/lubridate/issues/388","repository_url":"https://api.github.com/repos/hadley/lubridate","labels_url":"https://api.github.com/repos/hadley/lubridate/issues/388/labels{/name}","comments_url":"https://api.github.com/repos/hadley/lubridate/issues/388/comments","events_url":"https://api.github.com/repos/hadley/lubridate/issues/388/events","html_url":"https://github.com/hadley/lubridate/issues/388","id":138929883,"number":388,"title":"Error when computing time_length in years for a missing value","user":{"login":"larmarange","id":966307,"avatar_url":"https://avatars.githubusercontent.com/u/966307?v=3","gravatar_id":"","url":"https://api.github.com/users/larmarange","html_url":"https://github.com/larmarange","followers_url":"https://api.github.com/users/larmarange/followers","following_url":"https://api.github.com/users/larmarange/following{/other_user}","gists_url":"https://api.github.com/users/larmarange/gists{/gist_id}","starred_url":"https://api.github.com/users/larmarange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larmarange/subscriptions","organizations_url":"https://api.github.com/users/larmarange/orgs","repos_url":"https://api.github.com/users/larmarange/repos","events_url":"https://api.github.com/users/larmarange/events{/privacy}","received_events_url":"https://api.github.com/users/larmarange/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-07T09:23:03Z","updated_at":"2016-03-07T10:00:33Z","closed_at":"2016-03-07T10:00:33Z","body":"Here an example:\r\n\r\n```r\r\n> time_length(interval(NA,ymd(\"2016-01-01\")))\r\n[1] NA\r\n> time_length(interval(NA,ymd(\"2016-01-01\")), unit = \"year\")\r\nError in if (any(e2@year != 0)) { : missing value where TRUE/FALSE needed\r\n```\r\n\r\nThe second command creates an error when `NA` is expected."}}