simplecountries
is a simple R package that helps to convert
alternative country names to common English. It only has the function
simple_country_name
. The main source is this wikipedia
article.
remotes::install_github("davidsjoberg/simplecountries")
This is a basic example:
library(simplecountries)
x <- c("Czech", "Great Britain")
simple_country_name(x)
#> [1] "Czechia" "United Kingdom"
countrycode
insteadSince simplecountries
was made the mature package countrycode
has
introduced the function countryname
which does the same thing but is
probably better maintained. You probably want to you that package
instead. More info
here
If there is alternative names missing from this function let me know!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.