In R, I need to make 100 repeat random permutations of group orders, keeping the composition and sizes of groups the same, but the order within the groups needs to be randomly shuffled (100 times)
By groups are A, B, C, D, E
For example,
A, B, B, B, E
A, E, E, C
C, E
C, D, D, A, A, E, C, E
C, D
D, E
Might become
B, B, E, B, A
A, C, E, E
E, C
D, A, A, C, E, D, E
D, C
E, D
shuffled 100 different ways as an output?