Skip to content
Prev 106021 / 398506 Next

ifelse question

I think you can find your answer if you study this part of the 
documentation for ifelse:

Details:
If yes or no are too short, their elements are recycled. yes will be 
evaluated if and only if any element of test is true, and analogously 
for no.

Also, consider this call:

ifelse(1:12 > 5, 1:3, 11:14)

-- Tony Plate
Jacques Ropers wrote: