ropensci-archive / nbaR

:warning: ARCHIVED :warning: R client library for the Netherlands Biodiversity Api (NBA)
Other
3 stars 2 forks source link

Advanced queries #40

Closed hettling closed 5 years ago

hettling commented 5 years ago

It would be great if users could use more idiomatic R code for multiple queries, e.g., something like r 'sex == female & identifications.taxonRank == species' rather than needing to create multiple QueryCondition objects and combine them in a QuerySpec object. I'm not sure how easy this would be to implement, but it could increase usability.

hettling commented 5 years ago

In the wrapper and full client functions, this can be accomplished with list("sex"="female", "identifications.taxonRank"="species"), which is I think not so difficult compared to QueryConditions. A more idiomatic syntax would be nice, but I think is more difficult to accomplish, it would include parsing R formulas or expressions, I guess. Also, some error handling would have to be implemented; for some fields, operators such as < or > are allowed, for others not. I therefore will put a wontfix label.