normalize_country_name: Normalize_country_name

Description Usage Arguments Value Examples

View source: R/countries_lib.R

Description

Countries names normalization (find the correct)

Usage

1
normalize_country_name(posnames, dif_acc = 0.2)

Arguments

posnames

Character vector of countries names to normalization.

dif_acc

Float accuracy parametr of string matching. Must be from 0.0 to 1.0

Value

Character vector of normalized names. Contains common names if normalizing was successful and "None" if not or unit vector "Invalid arguments" if types of arguments aren't correct (for example, zero length names in argument posnames or incorrect type of dif_acc).

Examples

1
2
3
4
normalize_country_name("Russia")
vect <- c("ru", "en", "usa") # posnames
normalize_country_name(vect)
normalize_country_name("United States", 0.3)

AlekseyPauls/countriesLibR documentation built on May 21, 2019, 7:53 a.m.