get_wormsid | R Documentation |
Retrieve Worms ID of a taxon from World Register of Marine Species (WORMS).
get_wormsid(
sci_com,
searchtype = "scientific",
marine_only = TRUE,
fuzzy = NULL,
accepted = FALSE,
ask = TRUE,
messages = TRUE,
rows = NA,
query = NULL,
...
)
as.wormsid(x, check = TRUE)
## S3 method for class 'wormsid'
as.wormsid(x, check = TRUE)
## S3 method for class 'character'
as.wormsid(x, check = TRUE)
## S3 method for class 'list'
as.wormsid(x, check = TRUE)
## S3 method for class 'numeric'
as.wormsid(x, check = TRUE)
## S3 method for class 'data.frame'
as.wormsid(x, check = TRUE)
## S3 method for class 'wormsid'
as.data.frame(x, ...)
get_wormsid_(
sci_com,
messages = TRUE,
searchtype = "scientific",
marine_only = TRUE,
fuzzy = NULL,
accepted = TRUE,
rows = NA,
query = NULL,
...
)
sci_com |
character; A vector of common or scientific names. Or, a
|
searchtype |
character; One of 'scientific' or 'common', or any unique abbreviation |
marine_only |
logical; marine only? default: |
fuzzy |
logical; fuzzy search. default: |
accepted |
logical; If TRUE, removes names that are not accepted valid
names by WORMS. Set to |
ask |
logical; should get_wormsid be run in interactive mode?
If |
messages |
logical; should progress be printed? |
rows |
numeric; Any number from 1 to infinity. If the default NaN, all
rows are considered. Note that this function still only gives back a wormsid
class object with one to many identifiers. See |
query |
Deprecated, see |
... |
Ignored |
x |
Input to |
check |
logical; Check if ID matches any existing on the DB, only
used in |
A vector of taxonomic identifiers as an S3 class.
If a taxon is not found an 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.
See get_id_details
for further details including
attributes and exceptions
classification()
Other taxonomic-ids:
get_boldid()
,
get_eolid()
,
get_gbifid()
,
get_ids()
,
get_iucn()
,
get_natservid()
,
get_nbnid()
,
get_pow()
,
get_tolid()
,
get_tpsid()
,
get_tsn()
,
get_uid()
,
get_wiki()
## Not run:
(x <- get_wormsid('Gadus morhua'))
attributes(x)
attr(x, "match")
attr(x, "multiple_matches")
attr(x, "pattern_match")
attr(x, "uri")
get_wormsid('Pomatomus saltatrix')
get_wormsid(c("Gadus morhua", "Lichenopora neapolitana"))
# marine_only
get_wormsid("Apedinella", marine_only=TRUE)
get_wormsid("Apedinella", marine_only=FALSE)
# fuzzy
## searchtype="scientific": fuzzy is TRUE by default
get_wormsid("Platypro", searchtype="scientific", fuzzy=TRUE)
get_wormsid("Platypro", searchtype="scientific", fuzzy=FALSE)
## searchtype="common": fuzzy is FALSE by default
get_wormsid("clam", searchtype="common", fuzzy=FALSE)
get_wormsid("clam", searchtype="common", fuzzy=TRUE)
# by common name
get_wormsid("dolphin", 'common')
get_wormsid("clam", 'common')
# specify rows to limit choices available
get_wormsid('Plat')
get_wormsid('Plat', rows=1)
get_wormsid('Plat', rows=1:2)
# When not found
get_wormsid("howdy")
get_wormsid(c('Gadus morhua', "howdy"))
# Convert a wormsid without class information to a wormsid class
# already a wormsid, returns the same
as.wormsid(get_wormsid('Gadus morhua'))
# same
as.wormsid(get_wormsid(c('Gadus morhua', 'Pomatomus saltatrix')))
# numeric
as.wormsid(126436)
# numeric vector, length > 1
as.wormsid(c(126436,151482))
# character
as.wormsid("126436")
# character vector, length > 1
as.wormsid(c("126436","151482"))
# list, either numeric or character
as.wormsid(list("126436","151482"))
## dont check, much faster
as.wormsid("126436", check=FALSE)
as.wormsid(126436, check=FALSE)
as.wormsid(c("126436","151482"), check=FALSE)
as.wormsid(list("126436","151482"), check=FALSE)
(out <- as.wormsid(c(126436,151482)))
data.frame(out)
as.wormsid( data.frame(out) )
# Get all data back
get_wormsid_("Plat")
get_wormsid_("Plat", rows=1)
get_wormsid_("Plat", rows=1:2)
get_wormsid_("Plat", rows=1:75)
# get_wormsid_(c("asdfadfasd","Plat"), rows=1:5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.