search for: iter_numb

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

Did you mean: item_num
2007 Dec 27
4
Conditionally incrementing a loop counter
Hi, I am trying a for loop from 1 to 100 by 1. However, if a condition does not get met, I want to "throw away" that iteration. So if my loop is for (i in 1:100) and i is say, 25 and the condition is not met then I don't want i to go up to 26. Is there a way to do that? I can't seem to manually adjust i because from what I understand, R creates 100 long vector and uses that to