Given a vector like:
labels <- c(1,2,3,3,3)
How to get all possible group relabelings? For this example:
1,2,3,3,3
1,3,2,2,2
2,1,3,3,3
2,3,1,1,1
3,1,2,2,2
3,2,1,1,1
I have been looking at the permute
package but I don't see how to apply it to this case.