fuzzy_search: Search for a word or phrase in a second vector that matches...

Description Usage Arguments Details Value Examples

View source: R/fuzzy_replace.R

Description

Search for a word or phrase in a second vector that matches the another word in the first vector.

Usage

1

Arguments

x

The vector with strings to be searched for in the second vector

y

The vector with usually the correct strings to be found

Details

This is a helpful function to correct city names according to IBGE names, when the list is to long to correct by hand.

Value

A vector of best matches from y based on the x input vector.

Examples

1
2
3
wrong_names<-c("Mogi das Cruses","Sao Paulo","CANTA GALLO")
correct_names<-c("Canta Galo","Mogi das Cruzes","S<c3><a3>o Paulo")
fuzzy_search(x=wrong_names,y=correct_names)

jjesusfilho/cidades documentation built on May 17, 2019, 11:15 p.m.