normalise_string: Normalise string

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Normalise provided string by : 1. removing extra spaces ([stringr::str_squish()]) and [trimws()]) 2. passing the string to lower case ([tolower()]) 3. removing all accents ([stringi::stri_trans_general()]), with id = "Latin-ASCII") 4. removing other special characters ('[-',.()/ ]') and replacing with '_'

Usage

1

Arguments

string

character string to be normalised. Accepts vectors too.

Value

normalise string

Examples

1
normalise_string("àaF   kgfk")

ElliottMess/pcodesOCHA documentation built on May 13, 2021, 10:25 p.m.