ropensci/natserv

subscript out of bounds error when field is empty

Closed this issue · 3 comments

If I try to run the following code:
res <- ns_data(uid = 'ELEMENT_GLOBAL.2.144209')
We get this error back: "Error in which_name(ch, "globalAbundance")[[1]] : subscript out of bounds"

This seems to happen when the 'description' value in the globalAbundance element is empty, but 'comments' is populated as in Scirpus ancistrochaetus. The description field for the golden eagle example is populated, and the issue is repeatable across other taxa.

thanks for the report, try again after reinstall devtools::install_github("ropenscilabs/natserv")

works! thanks!

great,

I expect more bugginess due to having not tested all possible data given back by natureserve - but i'll get to that soon