powered by
Detect sequential duplicates
sequential_duplicates(strings, ordering = NULL)
Character vector
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.
# NOT RUN { # return c(F, T, F, T, T, F) sequential_duplicates(c("a", "a", "b", "b", "b", "a")) # }
Run the code above in your browser using DataLab