if condition is met skip to next iteration in a for loop in r

for (i in 1:10) {
  if (i %% 2 == 0) {
    next
  }
  print(i)
}