rm_accent: Function to remove accents from words

View source: R/rm_accent.R

rm_accentR Documentation

Function to remove accents from words

Description

rm_accent Function to remove accents from words

Usage

rm_accent(str, pattern = "all")

Arguments

str

vector of strings that will have their accents removed.

pattern

string vector with one or more elements indicating which accents should be removed. To indicate which accents should be removed, a vector with the symbols should be passed. Example: pattern = c("´", "^") will strip out the acute and caret accents only. Other accepted words: "all" (remove all accents, which are "´", "'", "^", "~", "¨", "ç")

Value

vector without accent

Examples

x <- "São Paulo"

y <- rm_accent(x, pattern = "'")
print(y)

y <- rm_accent(x, pattern = "~")
print(y)

y <- rm_accent(x, pattern = "all")
print(y)


Jodavid/sentimentBR documentation built on Oct. 9, 2022, 8:37 a.m.