Skip to content
Prev 169969 / 398506 Next

ifelse()

I have a problem with ifelse(), I do not understand how it works.
num [1:6] 2 2 1 1 0 0
[1] 1 1 1 1 0 0
Can some one explain what is going on, I do not understand what ifelse is
doing in this case. Can someone explain the output Y.

Thanks