perc_overlap: Calculate the percent overlap between two ranges (x & y).

Description Usage Arguments Value Examples

Description

The fraction of overlap is relative to Range X (see examples).

Usage

1
perc_overlap(x.start, x.end, y.start, y.end)

Arguments

x.start

The start value for Range X

x.end

The end value for Range X

y.start

The start value for Range Y

y.end

The end value for Range Y

Value

the percent overlap of the ranges

Examples

1
2
3
4
5
6
7
## Not run: 
x = perc_overlap(0, 1, 0, 0.5)
stopifnot(x == 50)
x = perc_overlap(0, 0.5, 0, 1)
stopifnot(x == 100)

## End(Not run)


Search within the HTSSIP package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.