View source: R/standardizeCountry.R
standardizeCountry | R Documentation |
Standardizes country names to the list of countries used internally by this package.
standardizeCountry(country, fuzzyDist = 1, nthreads = 1, progressBar = TRUE)
country |
character vector of country names or ISO codes |
fuzzyDist |
for fuzzy searching, the maximum string distance allowed for a match; if 0, fuzzy searching is disabled. |
nthreads |
number of threads to use for parallelization of the
function. The R package |
progressBar |
if |
This package interacts with data from the Global Invasive Species Database
(GISD), the Reptile Database, as well as global maps that were used to
generate the internal dataset used by closestCountry
. Efforts
have been made to make country names consistent across these separate
datasets. This function can be used to convert the user's Country
field to the same standardized set.
Fuzzy matching uses the function adist
.
Parallelization with nthreads
becomes more time-efficient only if
the input vector is of multiple thousands of country names.
Character vector of the standardized country names. If no match
found, ""
is returned.
Pascal Title
standardizeCountry(c("Russian Federation", "USA", "Plurinational State of Bolivia", "Brezil"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.