I have 10 letters “a b c d e f g h i j” and 200 numbers from 1 to 200 with different number of instances, e.g. five 1s three 2s etc. making up 200 numbers in total.
I would like to assign each number a letter such that each letter has equal frequency.
So in this case I want 20 instances of each letter.
My problem is that I would like to randomly assign letters to numbers.
An example would be:
1 1 1 1 1 2 2 3 3 3 3 3 3 4 5 6 7 7 7 ...until 200
a a a a a e e f f f f f f d i j c c c ...until 200
Start with this– I’m deliberately not overwriting the existing column in
AThen you could
cbindif desired to combineA.newandA