translate_countrycodes | R Documentation |
The function translate any country code scheme to another if both are in the
are among the types present in the FAO API. If you require other codes or
conversion of country names to codes, consider the countrycodes
package.
translate_countrycodes(
data,
from = c("FAO", "M49", "ISO2", "ISO3"),
to = c("M49", "FAO", "ISO2", "ISO3", "name"),
oldCode,
reset_cache = FALSE
)
translateCountryCode(
data,
from = c("FAO", "M49", "ISO2", "ISO3"),
to = c("M49", "FAO", "ISO2", "ISO3", "name"),
oldCode,
reset_cache = FALSE
)
data |
The data frame |
from |
The name of the old coding system |
to |
The name of the new coding system |
oldCode |
The column name of the old country coding scheme |
reset_cache |
logical. Whether to pull data from FAOSTAT directly instead of caching |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.