I have a long flat list that needs to be partitioned. The list is formatted so the "header" is repeated, followed by the values. Essentially, it looks something like this:
list={a,a,1,2,3,b,b,5,6,c,c,1,5,a,a,7,8,9,1}
I am looking for an output of:
{{a,1,2,3},{b,5,6},{c,1,5},{a,7,8,9,1}}
The output above would then let me create the association list I need.
Obviously Partition
won't work because the sublists are of different lengths. I have looked at various ways to identify where the repeated "header" data is, but that doesn't help with the splits.