You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
I have a thought that for the most basic of queries you could simply have wrapper functions, e.g. specimen_search or taxon_search, which would take just names/ids and return R data structures that the majority of R users would understand. These wrappers would likely lead to much less coding on the part of the end-user and, although less flexible, they should make the package much more accessible.
E.g. this below wrapper let's a user run of the examples from "getting started".
specimen_search <- function(value, field) {
qcs <- vector(mode = 'list', length = length(value))
for (i in seq_along(value)) {
qcs[[i]] <- QueryCondition$new(field = field[[i]], operator = 'EQUALS',
value = value[[i]])
}
qs <- QuerySpec$new(conditions = qcs)
sc <- SpecimenClient$new()
res <- sc$query(querySpec = qs, size = 100)
lapply(X = res$content$resultSet, FUN = function(x) {
x$item$toList()
})
}
res <- specimen_search(value = c('female', 'species', "Equidae"),
field = c('sex', "identifications.taxonRank",
"identifications.defaultClassification.family"))
The text was updated successfully, but these errors were encountered:
I have a thought that for the most basic of queries you could simply have wrapper functions, e.g. specimen_search or taxon_search, which would take just names/ids and return R data structures that the majority of R users would understand. These wrappers would likely lead to much less coding on the part of the end-user and, although less flexible, they should make the package much more accessible.
E.g. this below wrapper let's a user run of the examples from "getting started".
The text was updated successfully, but these errors were encountered: