string_clean: Clean letters in a string.

Description Usage Arguments Details Value See Also Examples

View source: R/string_clean.R

Description

Transform string into a simple lowercase ASCII representation. Options to convert string to lowercase, remove non-letter characters, replace German Umlaute, and transliterate diacritical letters (á, å, ê, ...).

Usage

1
2
3
4
5
6
7
string_clean(
  string,
  lower = TRUE,
  spec_chars = TRUE,
  umlaute = TRUE,
  diacritics = TRUE
)

Arguments

string

A character vector.

lower

Boolean, convert string to lowercase.

spec_chars

Boolean, remove non-letters.

umlaute

Boolean, replace German Umlaute.

diacritics

Boolean, transliterate diacritical letters.

Details

The function removes full stops, i.e. breaks sentences.

Value

string, modified.

See Also

The function internally calls .remove_special_chars, .replace_umlaute, and .remove_diacritics.

Examples

1
string_clean("Thîs sŧriñg will bé å løt simplêr. Köln is not in M-V.")

thorepet/thoremisc documentation built on Oct. 8, 2021, 7:48 a.m.