str_replace_same_as_previous | R Documentation |
The common use of this function to clean up columns in a presentation-quality table.
str_replace_same_as_previous(string, replacement)
string |
a character vector |
replacement |
text to use as a replacement for duplicated values |
a single character vector with immediately repeating items replaced
str_replace_same_as_previous(
c("a", "a", "a", "b", "b", "c", "d", "d"),
""
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.