knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
# Install package from github devtools::install_github('skysign/KoreaAddressAPI', force = TRUE) # Install package from local directory #devtools::install_local('C:/work_git/KoreaAddressAPI', force = TRUE)
library(KoreaAddressAPI)
This function is to parse Korea address string as per administrative areas. KAParse read only the column which is pointed by columnName parameter, and add new columns for administrative areas such as SiDoMyeong, SiGunGuMyeong. If we can't find appropriated administrative area, we mark 'x' to its corresponding column.
KAParse(dfDirtyJuso, columnName)
dfDirtyJuso
Input data frame
columnName
column name of input data frame, which will be parsed
Returned data frame has new columns as corresponding administrative areas, and they have a parsed the name of particular administrative area.
dirtyJuso = c('서울특별시 \n\t 동작구 | | 사당동', '서울특별시 없는구 자당동') dfDirtyJuso = data.frame(dirtyJuso) dfDirtyJuso dfCleaned = KAParse(dfDirtyJuso, 'dirtyJuso') dfCleaned
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.