remove_diacritics: Remove Diacritical Marks on Characters

View source: R/clean.R

remove_diacriticsR Documentation

Remove Diacritical Marks on Characters

Description

Accent characters and other diacritical marks are often difficult to type, and thus can be missing from text. To normalize the various ways a user might spell a word that should have a diacritical mark, you can convert all such characters to their simpler equivalent character.

Usage

remove_diacritics(text)

Arguments

text

A character vector to clean.

Value

The character vector with simpler character representations.

Examples

# This text can appear differently between machines if we aren't careful, so
# we explicitly encode the desired characters.
sample_text <- "fa\u00e7ile r\u00e9sum\u00e9"
sample_text
remove_diacritics(sample_text)

piecemaker documentation built on June 7, 2023, 5:55 p.m.