Learn Python and AI for free! One week only. No credit card needed.
Ends in:
get_gbifid(sciname, ask = TRUE, verbose = TRUE, rows = NA,
phylum = NULL, class = NULL, order = NULL, family = NULL,
rank = NULL, ...)as.gbifid(x, check = FALSE)
## S3 method for class 'gbifid':
as.gbifid(x, check = FALSE)
## S3 method for class 'character':
as.gbifid(x, check = TRUE)
## S3 method for class 'list':
as.gbifid(x, check = TRUE)
## S3 method for class 'numeric':
as.gbifid(x, check = TRUE)
## S3 method for class 'data.frame':
as.gbifid(x, check = TRUE)
## S3 method for class 'gbifid':
as.data.frame(x, ...)
get_gbifid_(sciname, verbose = TRUE, rows = NA)
get_gbifid_
Filtering
below.Filtering
below.Filtering
below.Filtering
below.rank_ref
for possible
options. Though note that some data sources use atypical ranks, so inspect the
data itself for options. Optional. See Filtering
belas.gbifid
as.gbifid
phylum
, class
, order
, family
, and rank
are not used in the search to the data provider, but are used in filtering the data down
to a subset that is closer to the target you want. For all these parameters,
you can use regex strings since we use grep
internally to match.
Filtering narrows down to the set that matches your query, and removes the rest.get_tsn
, get_uid
,
get_tpsid
, get_eolid
,
get_colid
get_gbifid(sciname='Poa annua')
get_gbifid(sciname='Pinus contorta')
get_gbifid(sciname='Puma concolor')
# multiple names
get_gbifid(c("Poa annua", "Pinus contorta"))
# specify rows to limit choices available
get_gbifid(sciname='Pinus')
get_gbifid(sciname='Pinus', rows=10)
get_gbifid(sciname='Pinus', rows=1:3)
# When not found, NA given
get_gbifid(sciname="uaudnadndj")
get_gbifid(c("Chironomus riparius", "uaudnadndj"))
# Narrow down results to a division or rank, or both
## Satyrium example
### Results w/o narrowing
get_gbifid("Satyrium")
### w/ phylum
get_gbifid("Satyrium", phylum = "Magnoliophyta")
get_gbifid("Satyrium", phylum = "Arthropoda")
### w/ phylum & rank
get_gbifid("Satyrium", phylum = "Arthropoda", rank = "genus")
## Rank example
get_gbifid("Poa")
get_gbifid("Poa", rank = "order")
get_gbifid("Poa", rank = "family")
get_gbifid("Poa", family = "Coccidae")
# Fuzzy filter on any filtering fields
## uses grep on the inside
get_gbifid("Satyrium", phylum = "arthropoda")
get_gbifid("Poa", order = "*tera")
get_gbifid("Poa", order = "*ales")
# Convert a uid without class information to a uid class
as.gbifid(get_gbifid("Poa annua")) # already a uid, returns the same
as.gbifid(get_gbifid(c("Poa annua","Puma concolor"))) # same
as.gbifid(2704179) # numeric
as.gbifid(c(2704179,2435099,3171445)) # numeric vector, length > 1
as.gbifid("2704179") # character
as.gbifid(c("2704179","2435099","3171445")) # character vector, length > 1
as.gbifid(list("2704179","2435099","3171445")) # list, either numeric or character
## dont check, much faster
as.gbifid("2704179", check=FALSE)
as.gbifid(2704179, check=FALSE)
as.gbifid(2704179, check=FALSE)
as.gbifid(c("2704179","2435099","3171445"), check=FALSE)
as.gbifid(list("2704179","2435099","3171445"), check=FALSE)
(out <- as.gbifid(c(2704179,2435099,3171445)))
data.frame(out)
as.uid( data.frame(out) )
# Get all data back
get_gbifid_("Puma concolor")
get_gbifid_(c("Pinus", "uaudnadndj"))
get_gbifid_(c("Pinus", "Puma"), rows=5)
get_gbifid_(c("Pinus", "Puma"), rows=1:5)
# use curl options
library("httr")
get_gbifid("Quercus douglasii", config=verbose())
bb <- get_gbifid("Quercus douglasii", config=progress())
Run the code above in your browser using DataLab