Get Overlap Size between Interval x and y
get_intersect_size(x.start, x.end, y.start, y.end)
x.start | start position of interval x. |
---|---|
x.end | start position of interval x. |
y.start | start position of interval x. |
y.end | start position of interval x. |
a numeric vector.
o1 <- get_intersect_size(1, 5, 3, 20) o1 o2 <- get_intersect_size(3, 20, 1, 10) o2 o3 <- get_intersect_size(c(1, 2, 1), c(10, 4, 6), c(4, 2, 5), c(10, 3, 22)) o3