# First, let's create two vectors for comparison. > x2 <- c(1:5) > y2 <- c(1, 2, -7, 4, 5). # Let's verify if the elements in x2 are greater or equal to 3. # R returns a TRUE/FALSE value for each element (in order). > x2 >= 3 [1] FALSE FALSE TRUE TRUE TRUE # Let's see if the elements of x2 are exactly equal to those of y2. > x2 == y2 [1] TRUE TRUE FALSE TRUE TRUE # Is 3 not equal to 4? Of course! > 3 != 4 [1] TRUE # Let's see which values in x2 are greater than 2 but smaller than 5. # You have to write x2 twice. # If you write x2 > 2 & < 5, you will get an error message. > x2 > 2 & x2 < 5 [1] FALSE FALSE TRUE TRUE FALSE