rgbif occ_download argument "establishmentMeans"

,

Heyo,

Using the API to search occurrences.

According to GitHub post GBIF API feature: faceted search #215, establishmentMeans is included as an argument. However, it’s not included in the package pdf.

Here’s a simple example:

occ_download(
“taxonKey” = 2685383,
pred(“establishmentMeans”, “NATIVE”),
user=user,pwd=pwd,email=email
)

Where I’m getting this error:

Error: ‘key’ not in acceptable set of keys; see ?occ_download

Any insight would be greatly appreciated! Thank you!

1 Like

Thanks for your question @rkirsten

You’re right establishmentMeans is not supported but should be. I’ve just added it. Restart R, reinstall remotes::install_github("ropensci/rgbif"), and try again:

occ_download(
  pred("taxonKey", 2685383),
  pred("establishmentMeans", "NATIVE")
)

An unrelated thing to your question: recent versions of the package require that all queries in occ_download() be within pred calls. So “taxonKey” = 2685383 should instead be pred("taxonKey", 2685383)

2 Likes

@sckott Thanks! Worked like a charm. And yes, pred always.

great, glad it worked