find_distance {target} | R Documentation

## Find the distance between peaks and regions

### Description

Calculate the distance between the elements of two GRanges objects.

### Usage

    find_distance(peaks, regions, how = "center")

### Arguments

`peaks` | A GRanges object
`regions` | A GRanges object
`how` | A character string, default 'center'

### Value

A vector of integers

### Examples

    library(IRanges)

    query <- IRanges(c(1, 4, 9), c(5, 7, 10))
    subject <- IRanges(c(2, 2, 10), c(2, 3, 12))
    find_distance(query, subject)

[Package target version 1.8.0 Index]