sequential_duplicates | R Documentation |
Detect sequential duplicates
sequential_duplicates(strings, ordering = NULL)
strings |
Character vector |
ordering |
Optional: treat strings as if ordered like strings[ordering], or, if a function, strings[ordering(strings)] |
A logical vector which indicates if a string is identical to the previous string.
# return c(F, T, F, T, T, F) sequential_duplicates(c("a", "a", "b", "b", "b", "a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.