Remember that rbinom takes vector arguments, including for its probabilities. Thus, you only need to say: rbinom(100,size=1,prob=prob_of_one).
確定! 回上一頁