Sample and rbinom generating disparate results? I am sure I am just misunderstanding this but rbinom and sample seem to be generating disparate results and I am not sure why. I am trying to create a categorical factor with a balanced third in each levels (so .33 get 0, .33 get 1, .33 get 2).
If I attempt to sample evenly 1/3 from rbinom(), I get uneven distributions:
table(rbinom(100,2,c(.33,.33,.33)))
 0  1  2 
47 42 11 
 0  1  2 
49 41 10
 0  1  2 
46 40 14 
 0  1  2 
45 43 12 
 0  1  2 
46 38 16 

The third level is not getting many successes and I am not sure why.
If I do the same thing for the sample() function, I get more satisfactory results.
table(sample(c(1,2,3),100,replace = T,prob = c(.33,.33,.33)))
 1  2  3 
32 32 36 
 1  2  3 
39 33 28 
 1  2  3 
30 41 29 
 1  2  3 
33 34 33 
1  2  3 
36 25 39 
1  2  3 
39 31 30 

Here, each level (1, 2, and 3) is getting around 33% of successes which is what I wanted.
How do I get rbinom() to do the same thing, distributing successes evenly across 1, 2, and 3?

When calling
rbinom(100,2,c(a,b,c))

the outcome is equivalent to
c(rbinom(2,a),rbinom(2,b),rbinom(2,c),rbinom(2,a),rbinom(2,b),...)

