in R, I would like to know if there are consecutive repetitions in my data.
A <- c(1,2,3,3,4) B <- c(1,2,3,4,3)
For A, I want to get TRUE, since there are two 3s directly one after another.
For B, I want to get FALSE because 3s are separated by 4.
Thanks to the community! pointingeye
source share