replace_with_nothing: Cleans some patterns in a text by removing them.

View source: R/replace_with.R

replace_with_nothingR Documentation

Cleans some patterns in a text by removing them.

Description

Cleans some patterns in a text by removing them.

Usage

replace_with_nothing(text, patterns_to_nothing)

Arguments

text

the character vector to clean.

patterns_to_nothing

the patterns to replace (either passed as a table with column "from" or passed as a vector)

Value

the same text with patterns replaced by nothing

Examples

replace_with_nothing(c("This is an examplexxx of unclean texxxxt brrr.",
                       "brrrxxxx And anotherxxx one.",
                       "Yet anothxxxer."),
                      c("xxx","brrr"))

lvaudor/textoteR documentation built on April 5, 2025, 3:03 a.m.