Learn R Programming

regioneR (version 1.4.0)

meanDistance: Mean Distance

Description

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

Usage

meanDistance(A, B, ...)

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.

Examples

Run this code
A <- data.frame("chr1", c(1, 10, 20, 30), c(12, 13, 28, 40))

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

meanDistance(A, B)

Run the code above in your browser using DataLab