Title: | World Register of Marine Species (WoRMS) Client |
---|---|
Description: | Client for World Register of Marine Species (<https://www.marinespecies.org/>). Includes functions for each of the API methods, including searching for names by name, date and common names, searching using external identifiers, fetching synonyms, as well as fetching taxonomic children and taxonomic classification. |
Authors: | Scott Chamberlain [aut] , Bart Vanhoorne. [aut, cre] |
Maintainer: | Bart Vanhoorne. <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.4.3 |
Built: | 2024-10-28 05:51:22 UTC |
Source: | https://github.com/ropensci/worrms |
World Register of Marine Species Client
The WoRMS REST API doesn't have sophisticated error messaging, so
most errors will result in a (204) - No Content
or
in (400) - Bad Request
Because WoRMS doesn't do comprehensive error reporting, we do a fair amount of checking user inputs to help prevent errors that will be meaningless to the user. Let us know if we can improve on this.
Scott Chamberlain [email protected]
Get AphiaIDs by attribute definition ID
wm_attr_aphia(id, offset = 1, ...) wm_attr_aphia_(id = NULL, name = NULL, ...)
wm_attr_aphia(id, offset = 1, ...) wm_attr_aphia_(id = NULL, name = NULL, ...)
id |
(numeric/integer) a attribute ID. For |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_attr_aphia(id = 7) wm_attr_aphia(id = 4) wm_attr_aphia(id = 4, offset = 50) wm_attr_aphia_(id = c(7, 2)) ## End(Not run)
## Not run: wm_attr_aphia(id = 7) wm_attr_aphia(id = 4) wm_attr_aphia(id = 4, offset = 50) wm_attr_aphia_(id = c(7, 2)) ## End(Not run)
Get attributes grouped by a CategoryID
wm_attr_category(id, ...) wm_attr_category_(id = NULL, name = NULL, ...)
wm_attr_category(id, ...) wm_attr_category_(id = NULL, name = NULL, ...)
id |
(numeric/integer) a CategoryID. For |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_attr_category(id = 7) wm_attr_category(id = 2) wm_attr_category_(id = c(7, 2)) ## End(Not run)
## Not run: wm_attr_category(id = 7) wm_attr_category(id = 2) wm_attr_category_(id = c(7, 2)) ## End(Not run)
Get attribute data by AphiaID
wm_attr_data(id, include_inherited = FALSE, ...) wm_attr_data_(id = NULL, name = NULL, ...)
wm_attr_data(id, include_inherited = FALSE, ...) wm_attr_data_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
include_inherited |
(logical) Include attributes inherited from
its parent taxon. Default: |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_attr_data(id = 127160) wm_attr_data(id = 126436) wm_attr_data_(id = c(127160, 126436)) ## End(Not run)
## Not run: wm_attr_data(id = 127160) wm_attr_data(id = 126436) wm_attr_data_(id = c(127160, 126436)) ## End(Not run)
Get attribute definition by ID
wm_attr_def(id, include_inherited = FALSE, ...) wm_attr_def_(id = NULL, name = NULL, ...)
wm_attr_def(id, include_inherited = FALSE, ...) wm_attr_def_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an attribute ID. For |
include_inherited |
(logical) Include attributes inherited from
its parent taxon. Default: |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_attr_def(id = 1) wm_attr_def(id = 4) wm_attr_def(id = 4, include_inherited = TRUE) wm_attr_def_(id = c(4, 1)) ## End(Not run)
## Not run: wm_attr_def(id = 1) wm_attr_def(id = 4) wm_attr_def(id = 4, include_inherited = TRUE) wm_attr_def_(id = c(4, 1)) ## End(Not run)
Get children for an AphiaID
wm_children(id, marine_only = TRUE, offset = 1, ...) wm_children_(id = NULL, name = NULL, marine_only = TRUE, offset = 1, ...)
wm_children(id, marine_only = TRUE, offset = 1, ...) wm_children_(id = NULL, name = NULL, marine_only = TRUE, offset = 1, ...)
id |
(numeric/integer) an AphiaID. For |
marine_only |
(logical) marine only or not. default: |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_children(343613) wm_children(id = 105706) wm_children(id = 105706, FALSE) wm_children(id = 105706, offset = 5) # plural version, via id or name wm_children_(id = c(105706, 343613)) wm_children_(name = c('Mesodesma', 'Leucophaeus')) ## End(Not run)
## Not run: wm_children(343613) wm_children(id = 105706) wm_children(id = 105706, FALSE) wm_children(id = 105706, offset = 5) # plural version, via id or name wm_children_(id = c(105706, 343613)) wm_children_(name = c('Mesodesma', 'Leucophaeus')) ## End(Not run)
Get classification for an AphiaID
wm_classification(id, ...) wm_classification_(id = NULL, name = NULL, ...)
wm_classification(id, ...) wm_classification_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_classification(id = 105706) wm_classification(id = 126436) wm_classification(254967) wm_classification(344089) # plural version, via id or name wm_classification_(id = c(254967, 344089)) wm_classification_(name = c('Platanista gangetica', 'Leucophaeus scoresbii')) ## End(Not run)
## Not run: wm_classification(id = 105706) wm_classification(id = 126436) wm_classification(254967) wm_classification(344089) # plural version, via id or name wm_classification_(id = c(254967, 344089)) wm_classification_(name = c('Platanista gangetica', 'Leucophaeus scoresbii')) ## End(Not run)
Get vernacular names from an AphiaID
wm_common_id(id, ...) wm_common_id_(id = NULL, name = NULL, ...)
wm_common_id(id, ...) wm_common_id_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_common_id(id = 105706) wm_common_id(id = 156806) wm_common_id(id = 397065) wm_common_id_(id = c(105706, 156806, 397065)) nms <- c("Rhincodontidae", "Mesodesma deauratum", "Cryptomya californica") wm_common_id_(name = nms) ## End(Not run)
## Not run: wm_common_id(id = 105706) wm_common_id(id = 156806) wm_common_id(id = 397065) wm_common_id_(id = c(105706, 156806, 397065)) nms <- c("Rhincodontidae", "Mesodesma deauratum", "Cryptomya californica") wm_common_id_(name = nms) ## End(Not run)
Get distribution data by AphiaID
wm_distribution(id, ...) wm_distribution_(id = NULL, name = NULL, ...)
wm_distribution(id, ...) wm_distribution_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_distribution(id = 156806) wm_distribution(id = 126436) wm_distribution_(id = c(156806, 126436)) ## End(Not run)
## Not run: wm_distribution(id = 156806) wm_distribution(id = 126436) wm_distribution_(id = c(156806, 126436)) ## End(Not run)
Get an external ID via an AphiaID
wm_external(id, type = "tsn", ...) wm_external_(id = NULL, name = NULL, type = "tsn", ...)
wm_external(id, type = "tsn", ...) wm_external_(id = NULL, name = NULL, type = "tsn", ...)
id |
(numeric/integer) an AphiaID. For |
type |
(character) the type of external id. one of: tsn, bold, dyntaxa, eol, fishbase, iucn, lsid, ncbi, gisd. default: tsn |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
An integer that is the ID. When using underscore method, a list, named by the input IDs
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: # by default, get a TSN (an ITIS code) wm_external(id = 1080) ## get many wm_external_(id = c(1080, 126436)) # BOLD code wm_external(id = 278468, type = "bold") # NCBI code wm_external(id = 278468, type = "ncbi") # fishbase code wm_external(id = 278468, type = "fishbase") # curl options library(crul) wm_external(id = 105706, verbose = TRUE) ## End(Not run)
## Not run: # by default, get a TSN (an ITIS code) wm_external(id = 1080) ## get many wm_external_(id = c(1080, 126436)) # BOLD code wm_external(id = 278468, type = "bold") # NCBI code wm_external(id = 278468, type = "ncbi") # fishbase code wm_external(id = 278468, type = "fishbase") # curl options library(crul) wm_external(id = 105706, verbose = TRUE) ## End(Not run)
Get taxonomic name for an AphiaID
wm_id2name(id, ...) wm_id2name_(id, ...)
wm_id2name(id, ...) wm_id2name_(id, ...)
id |
(numeric/integer) an AphiaID, required. For |
... |
named curl options. see |
An character string that is the taxnomic name. When using underscore method, a list, named by the input IDs
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_id2name(id = 105706) wm_id2name_(id = c(105706, 126436)) ## End(Not run)
## Not run: wm_id2name(id = 105706) wm_id2name_(id = c(105706, 126436)) ## End(Not run)
Get AphiaID from a taxonomic name
wm_name2id(name, ...) wm_name2id_(name, ...)
wm_name2id(name, ...) wm_name2id_(name, ...)
name |
(character) a taxonomic name, required. For
|
... |
named curl options. see |
An integer that is the AphiaID. When using underscore method, a list, named by the input names
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_name2id(name = "Rhincodon") wm_name2id_(name = c("Rhincodon", "Gadus morhua")) ## End(Not run)
## Not run: wm_name2id(name = "Rhincodon") wm_name2id_(name = c("Rhincodon", "Gadus morhua")) ## End(Not run)
Get taxonomic ranks by their identifier
wm_ranks_id(rank_id, id = NULL, offset = 1, ...) wm_ranks_name(rank_name, id = NULL, offset = 1, ...)
wm_ranks_id(rank_id, id = NULL, offset = 1, ...) wm_ranks_name(rank_name, id = NULL, offset = 1, ...)
rank_id |
(numeric/integer) a rank identifier. length==1 |
id |
an AphiaID. length==1 |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
rank_name |
(character) a rank name. length==1 |
A tibble/data.frame
## Not run: wm_ranks_id(220) wm_ranks_id(180) wm_ranks_id(180, id = 4) wm_ranks_name("genus") wm_ranks_name("genus", id = 4) ## End(Not run)
## Not run: wm_ranks_id(220) wm_ranks_id(180) wm_ranks_id(180, id = 4) wm_ranks_name("genus") wm_ranks_name("genus", id = 4) ## End(Not run)
Get complete AphiaRecord for an AphiaID
wm_record(id, ...) wm_record_(id = NULL, name = NULL, ...)
wm_record(id, ...) wm_record_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A named list. When using underscore method, each output is named by the input ID, and can be separated by the list names
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
wm_record_
is defunct, wm_record
can do plural requests now
## Not run: wm_record(id = 105706) wm_record(id = c(105706, 126436)) wm_record_(id = c(105706, 126436)) ## End(Not run)
## Not run: wm_record(id = 105706) wm_record(id = c(105706, 126436)) wm_record_(id = c(105706, 126436)) ## End(Not run)
Get record by external ID
wm_record_by_external(id, type = "tsn", ...) wm_record_by_external_(id = NULL, name = NULL, type = "tsn", ...)
wm_record_by_external(id, type = "tsn", ...) wm_record_by_external_(id = NULL, name = NULL, type = "tsn", ...)
id |
(numeric/integer) an AphiaID. For |
type |
(character) the type of external id. one of: tsn, bold, dyntaxa, eol, fishbase, iucn, lsid, ncbi, gisd. default: tsn |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A named list. When using underscore method, each output is named by the input ID, and can be separated by the list names
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_record_by_external(id = 85257) wm_record_by_external(id = 159854) wm_record_by_external_(id = c(85257, 159854)) ## End(Not run)
## Not run: wm_record_by_external(id = 85257) wm_record_by_external(id = 159854) wm_record_by_external_(id = c(85257, 159854)) ## End(Not run)
Get records by vernacular name, optional fuzzy matching
wm_records_common(name, fuzzy = FALSE, offset = 1, ...) wm_records_common_(name, fuzzy = FALSE, offset = 1, ...)
wm_records_common(name, fuzzy = FALSE, offset = 1, ...) wm_records_common_(name, fuzzy = FALSE, offset = 1, ...)
name |
(character) a species common name. required. For
|
fuzzy |
(logical) fuzzy search. default: |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_records_common(name = 'dolphin') wm_records_common(name = 'clam') wm_records_common_(name = c('dolphin', 'clam')) wm_records_common(name = 'dolphin', fuzzy = TRUE) wm_records_common(name = 'clam', fuzzy = TRUE, offset = 5) ## End(Not run)
## Not run: wm_records_common(name = 'dolphin') wm_records_common(name = 'clam') wm_records_common_(name = c('dolphin', 'clam')) wm_records_common(name = 'dolphin', fuzzy = TRUE) wm_records_common(name = 'clam', fuzzy = TRUE, offset = 5) ## End(Not run)
Get records by date
wm_records_date( start_date, end_date = NULL, marine_only = TRUE, offset = 1, ... )
wm_records_date( start_date, end_date = NULL, marine_only = TRUE, offset = 1, ... )
start_date |
(character) start date. required. |
end_date |
(character) end date. optional |
marine_only |
(logical) marine only or not. default: |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
A tibble/data.frame
## Not run: a_date <- format(Sys.Date() - 1, "%Y-%m-%dT%H:%M:%S+00:00") wm_records_date(a_date) ## End(Not run)
## Not run: a_date <- format(Sys.Date() - 1, "%Y-%m-%dT%H:%M:%S+00:00") wm_records_date(a_date) ## End(Not run)
Get records by single name, optional fuzzy matching
wm_records_name(name, fuzzy = TRUE, marine_only = TRUE, offset = 1, ...)
wm_records_name(name, fuzzy = TRUE, marine_only = TRUE, offset = 1, ...)
name |
(character) a taxonomic name, required. |
fuzzy |
(logical) fuzzy search. default: |
marine_only |
(logical) marine only or not. default: |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
A tibble/data.frame
there is no underscore method like other functions in this package
as there is already a plural version: wm_records_names()
## Not run: wm_records_name(name = 'Leucophaeus') wm_records_name(name = 'Leucophaeus', fuzzy = FALSE) wm_records_name(name = 'Leucophaeus', marine_only = FALSE) wm_records_name(name = 'Platanista', marine_only = FALSE) wm_records_name(name = 'Platanista', marine_only = FALSE, offset = 5) ## End(Not run)
## Not run: wm_records_name(name = 'Leucophaeus') wm_records_name(name = 'Leucophaeus', fuzzy = FALSE) wm_records_name(name = 'Leucophaeus', marine_only = FALSE) wm_records_name(name = 'Platanista', marine_only = FALSE) wm_records_name(name = 'Platanista', marine_only = FALSE, offset = 5) ## End(Not run)
Get records for one or more taxonomic name(s)
wm_records_names(name, marine_only = TRUE, ...)
wm_records_names(name, marine_only = TRUE, ...)
name |
(character) start date. required. |
marine_only |
(logical) marine only or not. default: |
... |
named curl options. see |
A list of tibble's/data.frame's, one for each of the input names
there is no underscore method like other functions in this package
as this is the plural version for wm_records_name()
## Not run: wm_records_names(name = 'Leucophaeus scoresbii') wm_records_names(name = c('Leucophaeus scoresbii', 'Coryphaena')) ## End(Not run)
## Not run: wm_records_names(name = 'Leucophaeus scoresbii') wm_records_names(name = c('Leucophaeus scoresbii', 'Coryphaena')) ## End(Not run)
Get AphiaRecords for a given taxonRankID
wm_records_rank(rank_id, id = NULL, offset = 1, ...)
wm_records_rank(rank_id, id = NULL, offset = 1, ...)
rank_id |
(numeric/integer) a rank id |
id |
(character) a single AphiaID |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_records_rank(rank_id = 180, id = 106776) wm_records_rank(rank_id = 180, id = 106776, offset = 50) ## End(Not run)
## Not run: wm_records_rank(rank_id = 180, id = 106776) wm_records_rank(rank_id = 180, id = 106776, offset = 50) ## End(Not run)
Get records for one or more taxonomic name(s) using the TAXAMATCH fuzzy matching algorithm
wm_records_taxamatch(name, marine_only = TRUE, ...)
wm_records_taxamatch(name, marine_only = TRUE, ...)
name |
(character) taxon name. required. |
marine_only |
(logical) marine only or not. default: |
... |
named curl options. see |
A list of tibble's/data.frame's, one for each of the input names
there is no underscore method like other functions in this package as this function already accepts many names
## Not run: wm_records_taxamatch(name = 'Leucophaeus') wm_records_taxamatch(name = c('Leucophaeus', 'Coryphaena')) ## End(Not run)
## Not run: wm_records_taxamatch(name = 'Leucophaeus') wm_records_taxamatch(name = c('Leucophaeus', 'Coryphaena')) ## End(Not run)
Get sources for an AphiaID
wm_sources(id, ...) wm_sources_(id = NULL, name = NULL, ...)
wm_sources(id, ...) wm_sources_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_sources(id = 105706) wm_sources_(id = 105706) wm_sources_(id = c(105706, 126436)) wm_sources_(name = c("Rhincodontidae", "Gadus morhua")) ## End(Not run)
## Not run: wm_sources(id = 105706) wm_sources_(id = 105706) wm_sources_(id = c(105706, 126436)) wm_sources_(name = c("Rhincodontidae", "Gadus morhua")) ## End(Not run)
Get synonyms for an AphiaID
wm_synonyms(id, offset = 1, ...) wm_synonyms_(id = NULL, name = NULL, ...)
wm_synonyms(id, offset = 1, ...) wm_synonyms_(id = NULL, name = NULL, ...)
id |
(numeric/integer) an AphiaID. For |
offset |
(integer) record to start at. default: 1 |
... |
named curl options. see |
name |
(character) one or more taxonomic names. optional |
A tibble/data.frame. when using underscore method, outputs from
each input are binded together, but can be split by id
column
Of the two sister functions, the one without the underscore is the original function that wraps the relavant WoRMS API method - and only accepts one thing (i.e., name or AphiaID) per request.
The sister function with the underscore at the end is the plural version, accepting more than one input. Internally this function loops over the non-underscore method, and labels output (whether it's a list or data.frame rows) with the input names or IDs so that you can easily parse output by your inputs.
## Not run: wm_synonyms(id = 105706) wm_synonyms_(id = 105706) wm_synonyms(id = 126436) wm_synonyms(id = 126436, offset = 10) wm_synonyms_(id = c(105706, 126436)) ## End(Not run)
## Not run: wm_synonyms(id = 105706) wm_synonyms_(id = 105706) wm_synonyms(id = 126436) wm_synonyms(id = 126436, offset = 10) wm_synonyms_(id = c(105706, 126436)) ## End(Not run)