e1 & e2 e1 | e2 ! e1 xor(e1, e2)
These are members of the Ops group of generic functions.
attach(cu.summary)cu.summary[Country=="USA" | Country=="Japan/USA", | Country == "Japan", ] # cars made in USA or Japan or both
cu.summary[!is.na(Reliability) & !is.na(Mileage),] # rows of cu.summary with no NA's in either Reliability or Mileage
safe <- !is.na(Mileage) cu.summary[xor(Mileage > 21, Mileage < 27) & safe, ] # cars with Mileages outside the interquartile range # exclusive of NA's
a <- c(T,F,NA) outer(a,a,"&") # logic table for &