Entering edit mode
9.1 years ago
John
▴
70
> ratio[i]
[1] 0.9
> length(sample(c(1,2,3,4,5,6,7,8,9),2000*ratio[i],replace=T))
[1] 1800
> length(sample(c(1,2,3,4,5,6,7,8,9),2000*(1-ratio[i]),replace=T))
[1] 199
Could someone help me figure out why the third command didn't return 200? Thanks!