meanDistance: Mean Distance

Description Usage Arguments Value Note Examples

View source: R/meanDistance.R

Description

Computes the mean distance of regions in A to the nearest element in B

Usage

1

Arguments

A

a region set in any of the accepted formats by toGRanges (GenomicRanges, data.frame, etc...)

B

a region set in any of the accepted formats by toGRanges (GenomicRanges, data.frame, etc...)

...

any additional parameter needed

Value

The mean of the distances of each region in A to the nearest region in B.

Note

If a region in A is in a chromosome where no B region is, it will be ignored and removed from the mean computation.

Examples

1
2
3
4
5
A <- data.frame("chr1", c(1, 10, 20, 30), c(12, 13, 28, 40))

B <- data.frame("chr1", 25, 35)

meanDistance(A, B)

regioneR documentation built on Nov. 8, 2020, 5 p.m.