Notebook
Arithmetic Operators Operator Description Example - Subtraction 5 - 1 = 4 + Addition 5 + 1 = 6 * Multiplication 5 * 3 = 15 / Division 10 / 2 = 5 ^ or ** Exponentiation 2*2*2*2*2 as 2 to the power of 5 x%%y Modulus 5%%2 is 1 x%/%y Integer Division 5%/%2 is 2Relational and Logical Operators Operator Description Example < less than 5 < 10 <= less than or equal to <= 5 > greater than 10 > 5 >= greater than or equal to >= 10 == exactly equal to == 10 != not equal to != 5 !x not x x <- c(5), !x x | y x or y x <- c(5), y <- c(10), x | y x & y x and y x <- c(5), y <- c(10), x & y isTRUE(x) tests whether x is true x <- TRUE, isTRUE(x) [1] FALSE