In R, you can do it using the rep
command:
tab <- data.frame(value=c(1, 2, 3, 4, 5), freq=c(32, 1, 4, 2,5 1))
vec <- rep(tab$value, tab$freq)
This gives following result:
> tab
value freq
1 1 32
2 2 21
3 3 4
4 4 2
5 5 1
> vec
[1] 1 1 1 2 2 3 3 3 3 34 4 5
For details, see the help file for the rep
command by typing ?rep
.