ropensci-archive / taxizesoap

:no_entry: ARCHIVED :no_entry: Taxonomic Information from Around the Soap Web
Other
9 stars 4 forks source link

Graceful fail condition for get_wormsid and others #14

Closed jebyrnes closed 8 years ago

jebyrnes commented 8 years ago

When feeding a name not in the db into get_wormsid() (and I'm guessing others), a no match causes the entire function to crash. e.g.

> get_wormsid(searchterm = c("Agarum clathratum", "bad species name"))

Retrieving data for taxon 'Agarum clathratum'

Retrieving data for taxon 'bad species name'

Error in `[.data.frame`(worms_df, , c("AphiaID", "scientificname", "status",  : 
  undefined columns selected

Can this fail gracefully and just return an NA?

sckott commented 8 years ago

changes in 9b05df113084a8c165a2b707c36eb8e20705114e

reinstall - let me know if it works, it should

jebyrnes commented 8 years ago

Bueno!