harmonize_prefecture_name(x, to)
Arguments
- x
Input vector.
- to
Option. Whether to use longer ("long") or shorter ("short")
prefectures.
Details
Convert with and without terminal notation, respectively.
Examples
x <- c("\u6771\u4eac\u90fd", "\u5317\u6d77\u9053", "\u6c96\u7e04\u770c")
harmonize_prefecture_name(x, to = "short")
#> [1] "東京" "北海道" "沖縄"
x <- c("\u6771\u4eac", "\u5317\u6d77\u9053", "\u6c96\u7e04")
harmonize_prefecture_name(x, to = "long")
#> [1] "東京都" "北海道" "沖縄県"