match_table {countries} | R Documentation |
Create a conversion table for country names
Description
This function returns a conversion table for country names to the desired naming conventions and languages. The use of fuzzy matching allows more flexibility in recognising and identifying country names.
Usage
match_table(
x,
to = c("simple", "ISO3"),
fuzzy_match = TRUE,
verbose = FALSE,
matching_info = FALSE,
simplify = TRUE,
na_fill = FALSE,
poor_matches = TRUE,
custom_table = NULL
)
Arguments
x |
A vector of country names |
to |
A vector containing one or more desired naming conventions to which |
fuzzy_match |
Logical value indicating whether fuzzy matching of country names should be allowed ( |
verbose |
Logical value indicating whether the function should print to the console a report on the matching process. Default is |
matching_info |
Logical value. If set to true the output match table will include additional information on the matching of |
simplify |
Logical value. If set to |
na_fill |
Logical value. If set to |
poor_matches |
Logical value. If set to |
custom_table |
Custom conversion table to be used. This needs to be a data.frame object. Default is |
Value
Returns a conversion table for countries names to the desired naming conventions. If simplify=FALSE
it returns a list object.
See Also
Examples
match_table(x=c("UK","Estados Unidos","Zaire","C#te d^ivoire"), to= c("UN_en","ISO3"))