ropensci / traits

R package for accessing species trait data from multiple databases
Other
40 stars 13 forks source link

Accept multiple IDs in betydb_*(id=...)? #83

Closed infotroph closed 2 years ago

infotroph commented 7 years ago

The id argument to all BETY functions is currently documented as (emphasis added) "One or more ids for a species, site, variable, etc." But at present no function handles multiple IDs gracefully.

betydb_specie(id=c(937, 222))
# Error: length(url) == 1 is not TRUE
# In addition: Warning message:
# In if (!grepl("/api/", url, fixed = TRUE)) { :
#  the condition has length > 1 and only the first element will be used

betydb_query(id=c(937, 222), genus="Miscanthus", table="species")
# Error in vapply(elements, encode, character(1)) : 
#  values must be length 1,
#  but FUN(X[[2]]) result is length 2

Thoughts, @dlebauer?

sckott commented 7 years ago

I guess it's up to you @infotroph and @dlebauer - but agreed that this should be clarified

sckott commented 7 years ago

@infotroph @dlebauer Is this something that should be dealt with soon, like before the next CRAN push? or hold off for a while (that is, should I put it in the milestone for the next CRAN push, or on a later milestone?)

dlebauer commented 7 years ago

Hold off, this is lower priority On Tue, Mar 21, 2017 at 4:00 PM Scott Chamberlain notifications@github.com wrote:

@infotroph https://github.com/infotroph @dlebauer https://github.com/dlebauer Is this something that should be dealt with soon, like before the next CRAN push? or hold off for a while (that is, should I put it in the milestone for the next CRAN push, or on a later milestone?)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/traits/issues/83#issuecomment-288200345, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcX57KVnTsRuJvJwblj-_lJd3sDJ35pks5roCxagaJpZM4L4tY9 .

maelle commented 2 years ago

This repository is about to be archived.