clean_comunas: Fix accents and weird characters in municipalities and gets...

View source: R/clean_comunas.R

clean_comunasR Documentation

Fix accents and weird characters in municipalities and gets them in proper format. Also converts some municipality names that can be spelled differently to a standard format.

Description

Fix accents and weird characters in municipalities and gets them in proper format. Also converts some municipality names that can be spelled differently to a standard format.

Usage

clean_comunas(dfName, varName)

Arguments

dfName

A dataframe containing a variable with municipalities

varName

A variable containing municipalities, in quotation marks.

Value

A character vector.

Examples

df <- data.frame(comunas=c("ñuñoa", "Peñalolén", "PEñaflor", "Las condes"))
clean_comunas(df, "comunas")

lhersko/comunista documentation built on Nov. 23, 2023, 11:30 a.m.