get_colid(sciname, ask = TRUE, verbose = TRUE, rows = NA, kingdom = NULL, phylum = NULL, class = NULL, order = NULL, family = NULL, rank = NULL, ...)
as.colid(x, check = TRUE)
"as.colid"(x, check = TRUE)
"as.colid"(x, check = TRUE)
"as.colid"(x, check = TRUE)
"as.colid"(x, check = TRUE)
"as.data.frame"(x, ...)
get_colid_(sciname, verbose = TRUE, rows = NA)
get_colid_
to get back all, or a subset, of the raw data that you are
presented during the ask process.Filtering
below.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
below.as.colid
NA
is given. If more than one identifier is found the
function asks for user input if ask = TRUE
, otherwise returns NA
.
If ask=FALSE
and rows
does not equal NA
, then a data.frame is
given back, but not of the uid class, which you can't pass on to other functions
as you normally can.Comes with the following attributes:
ask = FALSE
then 'NA due to ask=FALSE')
TRUE
, even if you get 1 name back because we try
to pattern match the name to see if there's any direct matches. So sometimes
this attribute is TRUE
, as well as pattern_match
, which then returns 1
resulting name without user prompt.
TRUE
then multiple_matches
must be TRUE
, and we found a perfect match to your
name, ignoring case. If FALSE
kingdom
, 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_colid
,
get_tpsid
, get_eolid
get_uid
, get_gbifid
,
get_ids
, classification
## Not run:
# get_colid(sciname='Poa annua')
# get_colid(sciname='Pinus contorta')
# get_colid(sciname='Puma concolor')
# # get_colid(sciname="Abudefduf saxatilis")
#
# get_colid(c("Poa annua", "Pinus contorta"))
#
# # specify rows to limit choices available
# get_colid(sciname='Poa annua')
# get_colid(sciname='Poa annua', rows=1)
# get_colid(sciname='Poa annua', rows=2)
# get_colid(sciname='Poa annua', rows=1:2)
#
# # When not found
# get_colid(sciname="uaudnadndj")
# get_colid(c("Chironomus riparius", "uaudnadndj"))
#
# # Narrow down results to a division or rank, or both
# ## Satyrium example
# ### Results w/o narrowing
# get_colid("Satyrium")
# ### w/ division
# get_colid("Satyrium", kingdom = "Plantae")
# get_colid("Satyrium", kingdom = "Animalia")
#
# ## Rank example
# get_colid("Poa")
# get_colid("Poa", kingdom = "Plantae")
# get_colid("Poa", kingdom = "Animalia")
#
# # Fuzzy filter on any filtering fields
# ## uses grep on the inside
# get_colid("Satyrium", kingdom = "p")
#
# # Convert a uid without class information to a uid class
# as.colid(get_colid("Chironomus riparius")) # already a uid, returns the same
# as.colid(get_colid(c("Chironomus riparius","Pinus contorta"))) # same
# as.colid("714831352ad94741e4321eccdeb29f58") # character
# # character vector, length > 1
# as.colid(c("714831352ad94741e4321eccdeb29f58", "3b35900f74ff6e4b073ddb95c32b1f8d"))
# # list, either numeric or character
# as.colid(list("714831352ad94741e4321eccdeb29f58", "3b35900f74ff6e4b073ddb95c32b1f8d"))
# ## dont check, much faster
# as.colid("714831352ad94741e4321eccdeb29f58", check=FALSE)
# as.colid(c("714831352ad94741e4321eccdeb29f58", "3b35900f74ff6e4b073ddb95c32b1f8d"),
# check=FALSE)
# as.colid(list("714831352ad94741e4321eccdeb29f58", "3b35900f74ff6e4b073ddb95c32b1f8d"),
# check=FALSE)
#
# (out <- as.colid(c("714831352ad94741e4321eccdeb29f58", "3b35900f74ff6e4b073ddb95c32b1f8d")))
# data.frame(out)
# as.colid( data.frame(out) )
#
# # Get all data back
# get_colid_("Poa annua")
# get_colid_("Poa annua", rows=2)
# get_colid_("Poa annua", rows=1:2)
# get_colid_(c("asdfadfasd","Pinus contorta"))
#
# get_colid(sciname="Andropadus nigriceps fusciceps", rows=1)
#
# # use curl options
# library("httr")
# get_colid("Quercus douglasii", config=verbose())
# bb <- get_colid("Quercus douglasii", config=progress())
# ## End(Not run)
Run the code above in your browser using DataLab