{"action":"opened","issue":{"url":"https://api.github.com/repos/ropensci/taxize/issues/397","labels_url":"https://api.github.com/repos/ropensci/taxize/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/taxize/issues/397/comments","events_url":"https://api.github.com/repos/ropensci/taxize/issues/397/events","html_url":"https://github.com/ropensci/taxize/issues/397","id":53593721,"number":397,"title":"Error from `get_uid` when `rows = 1` and name not found","user":{"login":"zachary-foster","id":6090555,"avatar_url":"https://avatars.githubusercontent.com/u/6090555?v=3","gravatar_id":"","url":"https://api.github.com/users/zachary-foster","html_url":"https://github.com/zachary-foster","followers_url":"https://api.github.com/users/zachary-foster/followers","following_url":"https://api.github.com/users/zachary-foster/following{/other_user}","gists_url":"https://api.github.com/users/zachary-foster/gists{/gist_id}","starred_url":"https://api.github.com/users/zachary-foster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachary-foster/subscriptions","organizations_url":"https://api.github.com/users/zachary-foster/orgs","repos_url":"https://api.github.com/users/zachary-foster/repos","events_url":"https://api.github.com/users/zachary-foster/events{/privacy}","received_events_url":"https://api.github.com/users/zachary-foster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-07T03:30:31Z","updated_at":"2015-01-07T03:30:31Z","closed_at":null,"body":"When the `rows` option of `get_uid` is 1 and a name is not found, an error is thrown. \r\nIt looks like an easy fix. \r\nIm going to try to fix it now.\r\n\r\n```{r}\r\n> get_uid('Dugesia', rows=1)\r\n\r\nRetrieving data for taxon 'Dugesia'\r\n\r\n[1] \"121909\"\r\nattr(,\"class\")\r\n[1] \"uid\"\r\nattr(,\"match\")\r\n[1] \"found\"\r\nattr(,\"uri\")\r\n[1] \"http://www.ncbi.nlm.nih.gov/taxonomy/121909\"\r\n```\r\n\r\n```{r}\r\n> get_uid('xxxxDugesiaxxxx')\r\n\r\nRetrieving data for taxon 'xxxxDugesiaxxxx'\r\n\r\nNot found. Consider checking the spelling or alternate classification\r\n[1] NA\r\nattr(,\"class\")\r\n[1] \"uid\"\r\nattr(,\"match\")\r\n[1] \"not found\"\r\n```\r\n\r\n```{r}\r\n> get_uid('xxxxDugesiaxxxx', rows=1)\r\n\r\nRetrieving data for taxon 'xxxxDugesiaxxxx'\r\n\r\n Show Traceback\r\n \r\n Rerun with Debug\r\n Error in data.frame(uid, att, stringsAsFactors = FALSE) : \r\n  arguments imply differing number of rows: 0, 1 \r\n```\r\n"}}