Description Usage Arguments Value Examples
Keep / discard strings based on pattern
1 2 3 | str_discard(.x, .pattern)
str_keep(.x, .pattern)
|
.x |
A character vector to collapse. |
.pattern |
A character value. Pattern to look for. |
A character vector.
1 2 3 | fruit <- c("apple", "banana", "pear", "pinapple")
str_keep(fruit, "apple")
str_discard(fruit, "apple")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.