for (...) {
df = custom_function(...)
}
Let's say there was some condition within the custom_function. If that condition is met, how can I make the go on the next iteration of this for loop? It seems that I cannot just run next
inside the function.
I saw this answer: breaking out of for loop when running a function inside a for loop in R - Stack Overflow
However, the constraint is that the function should not return NULL
, NA
, or something similar.