5 lines
95 B
R
5 lines
95 B
R
switchop <- function(s, x, y) {
|
|
if(s < 0) x || y
|
|
else if (s > 0) x && y
|
|
else xor(x, y)
|
|
}
|