vietnamcode {vietnamcode} | R Documentation |
Convert Vietnam provincial ID
Description
Converts Vietnam's provinces' names and ID across different formats. Handles diacritics and different spellings.
Usage
vietnamcode(sourcevar, origin = c("province_name", "enterprise_census",
"enterprise_census_old", "enterprise_census_c", "pci"),
destination = c("province_name", "province_name_diacritics",
"enterprise_census", "enterprise_census_old", "enterprise_census_c", "pci"))
Arguments
sourcevar |
Character vector that contains the codes or province names to be converted |
origin |
String that indicates the coding scheme of origin |
destination |
String that indicates the coding scheme of destination |
Note
Supports the following coding schemes:
province_name
province_name_diacritics
enterprise_censusm enterprise_census_old, enterprise_census_c: the same as GSO code
pci: Provincial Competitiveness Index
Examples
codes.of.origin <- vietnamcode::vietnamcode_data$province_name # Vector of values to be converted
vietnamcode(codes.of.origin, "province_name", "pci")
[Package vietnamcode version 0.1.1 Index]