x <- Hits(c(2, 4, 4, 4, 5, 5), c(3, 1, 3, 2, 3, 2), 6, 3,
score=11:16)
x
y <- Hits(c(1, 3, 4, 4, 5, 5, 5), c(3, 3, 2, 1, 2, 1, 3), 6, 3,
score=21:27)
y
union(x, y)
union(y, x) # same hits as in union(x, y), but in different order
intersect(x, y)
intersect(y, x) # same hits as in intersect(x, y), but in
# different order
setdiff(x, y)
setdiff(y, x)
setequal(x, y)
Run the code above in your browser using DataLab