indexesMerge {bsearchtools} | R Documentation |
Functions to perform intersection or union of a list of integer vectors. This functions are used by DFI.subset for AND/OR filters
intersectIndexesList(lst,sorted=TRUE)
unionIndexesList(lst,sorted=TRUE)
lst |
list of integer vectors on which intersection or union must be performed |
sorted |
logical value used to specify if the returned indexes should be sorted ascending (default TRUE) |
The returned vector is sorted ascending.
intersectIndexesList
is implemented in C++ and corresponds to sort(unique(Reduce(f=intersect,x=lst)))
(without the sort
function if sorted=FALSE
).
unionIndexesList
is partially implemented in C++ and corresponds to sort(unique(Reduce(f=union,x=lst)))
(without the sort
function if sorted=FALSE
).
A vector of integers.
intersectIndexesList(list(1:7,4:8,3:5))
unionIndexesList(list(1:7,4:8,3:5))