I am relatively new to R. I am iterating over a vector in R by using for() loop. However, based on a certain condition, I need to skip some values in the vector. The first thought that comes to mind is to change the loop index within the loop. I have tried that but somehow its not changing it. There must be some what to achieve this in R.
Thanks in advance.
Sami
You can change the loop index within a for loop, but it will not affect the execution of the loop; see the Details section of
?"for":Use a while loop instead and index it manually: