y - if (x 5) seq(0.1,10,0.1) x - seq(0.1,10,0.1) 1 if not 2
The condition length > 1 is shown by a warning (or an error from R version 4.2.0).
Instead of operating on the entire vector, I'd like the if to operate on each individual case. What do I need to alter?