R: Retrieve taxonomic identifiers for a given taxon name.

get_ids {taxize} | R Documentation

## Retrieve taxonomic identifiers for a given taxon name.

### Description

This is a convenience function to get identifiers across all data sources. You can use other `get_*` functions to get identifiers from specific sources if you like.

### Usage

    get_ids(names, db = c("itis", "ncbi", "eol", "col", "tropicos", "gbif",
      "nbn"), ...)

    get_ids_(names, db = c("itis", "ncbi", "eol", "col", "tropicos", "gbif",
      "nbn"), rows = NA, ...)

### Arguments

`names` | character; Taxonomic name to query.
`db` | character; database to query. One or more of `ncbi`, `itis`, `eol`, `col`, `tropicos`, `gbif`, or `nbn`. By default db is set to search all data sources. Note that each taxonomic data source has their own identifiers, so that if you vide the wrong `db` value for the identifier you could get a result, it will likely be wrong (not what you were expecting).
`...` | Other arguments passed to `get_tsn`, `get_uid`, `get_eolid`, `get_colid`, `get_tpsid`, `get_gbifid`, `get_nbnid`.
`rows` | numeric; Any number from 1 to infinity. If the default NA, all rows are returned. When used in `get_ids` this function still only gives back a ids class object with one to many identifiers. See `get_ids_` to get back all, or a subset, of the raw data that you are presented during the ask process.

### Value

A vector of taxonomic identifiers, each retaining their respective S3 classes so that each element can be passed on to another function (see e.g.'s).

### Note

There is a timeout of 1/3 seconds between queries to NCBI.

### See Also

`classification`

Other taxonomic-ids: `get_boldid`, `get_colid`, `get_eolid`, `get_gbifid`, `get_iucn`, `get_natservid`, `get_nbnid`, `get_tolid`, `get_tpsid`, `get_tsn`, `get_uid`, `get_wiki`, `get_wormsid`

### Examples

    ## Not run:
    # Plug in taxon names directly
    ## By default you get ids for all data sources
    get_ids(names="Chironomus riparius")

    # specify rows to limit choices available
    get_ids(names="Poa annua", db=c("col","eol"), rows=1)
    get_ids(names="Poa annua", db=c("col","eol"), rows=1:2)

    ## Or you can specify which source you want via the db parameter
    get_ids(names="Chironomus riparius", db = 'ncbi')

    get_ids(names="Salvelinus fontinalis", db = 'nbn')

    get_ids(names=c("Chironomus riparius", "Pinus contorta"), db = 'ncbi')
    get_ids(names=c("Chironomus riparius", "Pinus contorta"), db = c('ncbi','itis'))
    get_ids(names=c("Chironomus riparius", "Pinus contorta"), db = c('ncbi','itis','col'))
    get_ids(names="Pinus contorta", db = c('ncbi','itis','col','eol','tropicos'))
    get_ids(names="ava avvva", db = c('ncbi','itis','col','eol','tropicos'))
    get_ids(names="ava avvva", db = c('ncbi','itis','col','eol','tropicos'), verbose=FALSE)

    # Pass on to other functions
    out <- get_ids(names="Pinus contorta", db = c('ncbi','itis','col','eol','tropicos'))
    classification(out$itis)
    synonyms(out$tropicos)

    # Get all data back
    get_ids_(c("Chironomus riparius", "Pinus contorta"), db = 'nbn', rows=1:10)
    get_ids_(c("Chironomus riparius", "Pinus contorta"), db = c('nbn','gbif'), rows=1:10)

    # use curl options
    library("httr")
    get_ids("Agapostemon", db = "ncbi", config=verbose())
    bb <- get_ids("Pinus contorta", db = c('nbn','gbif'), config=progress())

    ## End(Not run)

[Package taxize version 0.9.0 Index]