sub() and gsub() perform replacement of the first and all matches respectively. 각 함수의 기본 형태 sub(pattern, replacement, x) gsub(pattern, replacement, x) pattern The pattern or the string which you want to be replaced. replacement A input string to replace the pattern string. x A vector or a data frame to replace the string. 사용 예시 # gsub() 기본 사용 ## 충정로2 -> 충정로2가 addr_trim 합동 addr_trim