I have a vector like this:
vectorx<-c(3,3,1,1,1,2,2,2,2,2,2,2,2,2)
and I want to check if the sequence 3,3,1,1,1,2 exists. It turns out that this sequence can be in any position of the vector, I just want to know if this sequence specifically exists, I want it to return TRUE or FALSE only. How do I do? I see many% in% but for a sequence that can occur in any position I have not seen yet. Thank you guys