I am looking for the best method to go from a sequence of events such as
time event 1 a 2 b 3 a 4 b 5 c 6 d 7 c 8 d 9 e
Where each letter corresponds to a certain event that occurs at a time. I want to reduce the number of events by aggregating frequently occurring events into a new event. A possible solution data set would look like,
1 a' 2 a' 3 a' 4 a' 5 b' 6 b' 7 b' 8 b' 9 e
where the clusters are created because they occur in a sequence following each other.
I was looking at the text mining algorithms in R with tm or RNA sequenceing with edgeR. But I have no experience in this so I was hoping that someone can shed me some light on a common approach for this type of problems.