overlaps | R Documentation |
Find intervals satisfying particular conditions, including corresponding base R functions intersect
(i.e. find intersections of intervals), union
(i.e. unions of intervals) and setdiff
(i.e. finding intervals which are contained in one set of intervals but not another).
overlaps(x, y, check = TRUE, in_x = TRUE, in_y = TRUE, op = "and")
intersects(x, y, ...)
unions(x, y, ...)
setdiffs(x, y, ...)
x |
Integer matrix of two columns, the first column giving the (inclusive) start points of intervals and the second column giving the corresponding (exclusive) end points. |
y |
Same as |
check |
Boolean value determining whether to check that the intervals specified in arguments |
in_x |
Boolean value determining whether to flag |
in_y |
Boolean value determining whether to flag |
op |
Character value specifying operator used to combine flags for each interval, either |
... |
Additional arguments to be passed to |
Intervals represented by integer matrix of two columns.
intersects(cbind(1, 3), cbind(2, 4))
setdiffs(cbind(1, 3), cbind(2, 4))
unions(cbind(1, 3), cbind(2, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.