x <- c(TRUE, FALSE, TRUE, FALSE) y <- c(TRUE, TRUE, FALSE, FALSE) x || y x && y ! x x | y x & y x == y x != y x = y # note that = is assignment, == is checking equality