search for: tp3334692p3334880

Displaying 1 result from an estimated 1 matches for "tp3334692p3334880".

2011 Mar 04
2
questions about using loop, while and next
Hello R helpers, I have a quick question about loop and next In my loop, I have some random generation of data, but if the data doesn't meet some condition, then I want it to go next, and generate data again for next round. # just an example.. # i want to generate the data again, if the sum is smaller than 25 temp=rep(NA, 10) for(i in 1:10) { dt=sum(rbinom(10, 5, 0.5)) while (dt<25) next