Learn R Programming

taxize (version 0.5.2)

get_colid: Get the Catalogue of Life ID from taxonomic names.

Description

Get the Catalogue of Life ID from taxonomic names.

Usage

get_colid(sciname, ask = TRUE, verbose = TRUE, rows = NA)

as.colid(x, check = TRUE)

## S3 method for class 'colid': as.colid(x, check = TRUE)

## S3 method for class 'character': as.colid(x, check = TRUE)

## S3 method for class 'list': as.colid(x, check = TRUE)

## S3 method for class 'numeric': as.colid(x, check = TRUE)

## S3 method for class 'data.frame': as.colid(x, check = TRUE)

## S3 method for class 'colid': as.data.frame(x, ...)

get_colid_(sciname, verbose = TRUE, rows = NA)

Arguments

sciname
character; scientific name.
ask
logical; should get_colid be run in interactive mode? If TRUE and more than one ID is found for the species, the user is asked for input. If FALSE NA is returned for multiple matches.
verbose
logical; If TRUE the actual taxon queried is printed on the console.
rows
numeric; Any number from 1 to inifity. If the default NA, all rows are considered. Note that this function still only gives back a colid class object with one to many identifiers. See get_colid_ to
x
Input to as.colid
check
logical; Check if ID matches any existing on the DB, only used in as.colid
...
Ignored

Value

  • A vector of unique identifiers. If a taxon is not found NA. If more than one ID is found the function asks for user input.

See Also

get_tsn, get_colid, get_tpsid, get_eolid

Examples

Run this code
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"))

# 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(8663146) # numeric
as.colid(c(8663146,19736162,18158318)) # numeric vector, length > 1
as.colid("19736162") # character
as.colid(c("8663146","19736162","18158318")) # character vector, length > 1
as.colid(list("8663146","19736162","18158318")) # list, either numeric or character
## dont check, much faster
as.colid("8663146", check=FALSE)
as.colid(8663146, check=FALSE)
as.colid(c("8663146","19736162","18158318"), check=FALSE)
as.colid(list("8663146","19736162","18158318"), check=FALSE)

(out <- as.colid(c(8663146,19736162,18158318)))
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)

Run the code above in your browser using DataLab