Hello,
I am looking for some ways to find patterns in set of common numbers. All the numbers can only contain values from 1 to 5. I unfortunately don't know all the ways in which patterns will present themselves but I want to at least pick up partial patterns and quantify it.
Below I have added some sequences. Any idea how to approach this?
#should find the repetition of 1,2,3
c(1,2,3,1,2,3,1,2,3)
#should find the repetition of 3,2,1
c(3,2,1,3,2,1,3,2,1)
#should find the 3,2 and 5,3 repititon
c(3,2,3,2,5,3,5,3,4)
#should find the larger pattern 1,4,5,4,1 and or 5,4,1 repeating
c(1,4,5,4,1,5,4,1,2)
#should not find any patterns
c(5,3,1,4,2,1,1,3,4)