Description Usage Arguments Value Examples
Finds words starting with a word in a given list, and replaces each such word prefix with a given replacement.
1 | filter_text(.data, .filters, .replacement, ...)
|
.data |
A data.frame or tibble. |
.filters |
A list of words and/or regexes. |
.replacement |
A character string used as replacement. |
... |
Columns to act upon. |
The original data, filtered.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data <- data.frame(
x = c("This is some text...", "...containing words."),
y = c("This is more text...", "...containing something."),
z = c("This is some more text...", "...containing more words.")
)
data <- data %>%
filter_text(
c("some", "words"),
"#",
x, y
)
# x y z
# 1 This is #### text... This is more text... This is some more text...
# 2 ...containing #####. ...containing ####thing. ...containing more words.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.