I want to find the unique sequences in my vector. A sequence is a series of identical values. If a sequence repeats, it counts as two sequences, as long as there is another sequence in between. A sequence can have a length of one value.
So that if my function is called findSequences(), it would work like this:
my_vector = c('a', 'a', 'b', 'a', 'c', 'c', 'b')
find_Sequences(my_vector)
> 'a', 'b', 'a', 'c', 'b'
unique() and distinct() don't do this.