{"action":"opened","issue":{"url":"https://api.github.com/repos/harrelfe/Hmisc/issues/28","labels_url":"https://api.github.com/repos/harrelfe/Hmisc/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/harrelfe/Hmisc/issues/28/comments","events_url":"https://api.github.com/repos/harrelfe/Hmisc/issues/28/events","html_url":"https://github.com/harrelfe/Hmisc/issues/28","id":95674441,"number":28,"title":"Error in minor.tick caused by no non-missing arguments to max","user":{"login":"earlbellinger","id":1755083,"avatar_url":"https://avatars.githubusercontent.com/u/1755083?v=3","gravatar_id":"","url":"https://api.github.com/users/earlbellinger","html_url":"https://github.com/earlbellinger","followers_url":"https://api.github.com/users/earlbellinger/followers","following_url":"https://api.github.com/users/earlbellinger/following{/other_user}","gists_url":"https://api.github.com/users/earlbellinger/gists{/gist_id}","starred_url":"https://api.github.com/users/earlbellinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earlbellinger/subscriptions","organizations_url":"https://api.github.com/users/earlbellinger/orgs","repos_url":"https://api.github.com/users/earlbellinger/repos","events_url":"https://api.github.com/users/earlbellinger/events{/privacy}","received_events_url":"https://api.github.com/users/earlbellinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-17T15:03:45Z","updated_at":"2015-07-17T15:03:45Z","closed_at":null,"body":"I have encountered an error that I detailed in this stackoverflow post:\r\n\r\nhttp://stackoverflow.com/questions/31478647/floating-point-difficulties-in-r-and-in-particular-in-hmiscs-minor-tick\r\n\r\nI think one quick solution is to change the lines \r\n\r\n    if (is.na(low.minor))\r\n\r\nand\r\n\r\n    if (is.na(hi.minor))\r\n\r\nto\r\n\r\n    if (is.na(low.minor) || is.infinite(low.minor))\r\n\r\nand\r\n\r\n    if (is.na(hi.minor) || is.infinite(hi.minor))\r\n\r\nbut a better solution is to first check whether \r\n\r\n    any(possible.minors >= range[1])\r\n\r\nand \r\n\r\n    any(possible.minors <= range[2])\r\n\r\nbefore doing any indexing so that warning messages are avoided. "}}