Last chance! 50% off unlimited learning
Sale ends in
mode_selection(x, y, mode = "none")
y
is a numeric
vector, it will be converted to a logical vector of the same length with
x
with TRUE
's corresponding to the numeric indicies)&
, |
,
xor
, !
x1 <- c(TRUE, TRUE, FALSE, FALSE)
x2 <- c(FALSE, TRUE, TRUE, FALSE)
mode_selection(x1, x2, "none")
mode_selection(x1, x2, "and")
mode_selection(x1, x2, "or")
mode_selection(x1, x2, "xor")
mode_selection(x1, x2, "not")
mode_selection(x1, x2, "complement")
mode_selection(x1, c(2, 3), "and") # equivalent to x2
Run the code above in your browser using DataLab