I am trying to do unions on several lists (these are actually GRanges objects not integer lists but the priciple is the same), basically one big union.
x<
x<-sort(sample(1:20, 9)) y<-sort(sample(10:30, 9)) z<-sort(sample(20:40, 9))
Both of the below produce the same output
unique(c(x,y,z)) [1] 1 2 4 6 7 8 11 15 17 14 16 18 21 23 26 28 29 20 22 25 31 32 35 union(x,union(y,z)) [1] 1 2 4 6 7 8 11 15 17 14 16 18 21 23 26 28 29 20 22 25 31 32 35