powered by
The fraction of overlap is relative to Range X (see examples).
perc_overlap(x.start, x.end, y.start, y.end)
The start value for Range X
The end value for Range X
The start value for Range Y
The end value for Range Y
the percent overlap of the ranges
# NOT RUN { x = HTSSIP:::perc_overlap(0, 1, 0, 0.5) stopifnot(x == 50) x = HTSSIP:::perc_overlap(0, 0.5, 0, 1) stopifnot(x == 100) # } # NOT RUN { # }
Run the code above in your browser using DataLab