Description Usage Arguments References Examples
Remove prefixes or suffixes
1 | str_filter(x, sep = ",", side = "left", greedy = TRUE)
|
sep |
character separator, defaults to "," |
side |
where to look, "left" (default) or "right" |
greedy |
defaults to TRUE |
#' @references http://www.r-bloggers.com/string-manipulations-on-full-names/
1 2 3 4 5 | ex = c("a", "a, b", "a, b, c", "a, b, c, d")
str_filter(ex, side = "left" , greedy = TRUE)
str_filter(ex, side = "right" , greedy = TRUE)
str_filter(ex, side = "left" , greedy = FALSE)
str_filter(ex, side = "right" , greedy = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.