Choice Operators (Making Choices)
Create the following variables.
w <- 10.2
x <- 1.3
y <- 2.8
z <- 17.5
colors <- c("red", "blue", "green")
dna1 <- "attattaggaccaca"
dna2 <- "attattaggaacaca"
Use them to print whether or not the following statements are TRUE or FALSE.
wis greater than 10"green"is incolorsxis greater thanywis greater thanx, orxis greater thanyxtimeswis between 13.2 and 13.5 (there is no way to indicate “between” in R so to do this we have to separately check if the number is greater than the minimum value and less than the maximum value, combining these two conditions with&)zisNAzis notNAdna1is the same asdna2dna1is not the same asdna2