How create a loop in R with non-sequential order of vector

I need to create a loop in R but my vector is not sequential. For example,

for (a in  1:20){
}

I need to exclude a=19 from the vector and jump to a=20.
I really appreciate any help you can provide. Thank you so much in advance for devoting time and energy.

  • “Just do it” 🙂

    – 

Leave a Comment