Saves user-defined administrative division codes and their associated labels
(in both Chinese and English) to the local dictionary used by canregtools
.
write_areacode(x = NULL, cache_refresh = FALSE)
Arguments
- x
A data frame containing at least the following columns:
areacode
, cname
, ename
, abbr_cn
, and abbr_en
.
- cache_refresh
Logical. If TRUE, refresh the dictionary to default values
before updating.
Value
Invisibly returns NULL
. The function is called for its side effect.
Examples
if (FALSE) { # \dontrun{
dict <- data.frame(
areacode = c("410302"),
cname = c("\u8001\u57CE\u533A"),
ename = c("Laocheng District"),
abbr_cn = c("\u8001\u57CE"),
abbr_en = c("Laocheng")
)
write_areacode(dict)
} # }