Set Operations
Union: A∪B={ξ∣ξ∈A or ξ∈B}
Intersection A∩B={ξ∣ξ∈A and ξ∈B}
Complement: Ac={ξ∣ξ∈Ω and ξ∉A}=Ω∖A
Note the correspondence with logic: or, and, not
Difference: A∖B={ξ∣ξ∈A and ξ∉B}=A∩Bc
A <- c(1,2,3,4,5)
B <- c(2,4,6)
union(A,B)
## [1] 1 2 3 4 5 6
## [1] 2 4
## [1] 1 3 5