I apologize if the title doesn't perfectly reflect what I am trying to do, as I'm not sure what to call it exactly. I am looking for a way to convert a frequency table back into data form.

I.E.
You have rankings from 1 to 4 and the frequency of each occurance

Rank, Frequency
1, 4
2, 3
3, 5
4, 1

I would like it to turn into the original data format (vector/list)
1
1
1
1
2
2
2
3
3
3
3
3
4


Thanks