Boolean (logical) operations



examples/basics/logical_boolean.R
TRUE & TRUE     # TRUE
TRUE & FALSE    # FALSE

TRUE | FALSE    # TRUE
FALSE | FALSE   # FALSE

! TRUE          # FALSE
! FALSE         # TRUE



# Logical Operations
a = TRUE
b = FALSE

a & b  # logical AND    FALSE
a | b  # logical OR     TRUE
! a    # logical NOT    FALSE

x = 2
y = 4
x & y   # TRUE
x & 0   # FALSE

examples/basics/boolean_operations_on_numbers.R
print(2 & 4)  # TRUE
print(2 & 0)  # FALSE
print(2 | 0)  # TRUE