I have a vector of length "l", which must consist of a strictly specified, looped sequence, for example "1 2 3"
x <- c(1,2,3,1,2,3,1,2,3,1,3,1,2,3,1,2,3,1,2,3,1,2,3,2,3,1,2,3,1,2,3,1,2,3,1,2,3)
but it contains gaps, such as: "1 3" or "2 3" or other similar variants of the sequence violation, how can i find errors in sequence and remove those incomplete sequences?