Description Usage Arguments Value Examples
View source: R/countries_lib.R
Add countries names to database
1 | match_country_name(posnames, realnames, priorities = "2")
|
posnames |
Character vector of possible countries names. |
realnames |
Character vector of official(common) countries names. |
priorities |
Character vector of priorities. Takes values "1" or "2". Priorities should have same length with posnames, otherwise will be initialized priorities vector with length of posnames and value "2". |
Unit character vector "Success" if matching was correct, or unit vector "Invalid arguments" if types of arguments aren't correct (for example, zero length names in argument posnames or diffrent length of posnames and realnames).
1 2 3 4 5 6 | match_country_name("Rassiya", "Russia")
vect_1 <- c("ru", "en", "usa") # posnames
vetc_2 <- c("Russia", "United Kingdom", "United States") #realnames
match_country_name(vect_1, vect_2)
vect_3 <- c("1", "2", "1") # priorities
match_country_name(vect_1, vect_2, vect_3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.