pointsWithin: Determine if a point is within a range

Description Usage Arguments Examples

View source: R/pointsWithin.R

Description

Determine if a point is within a range

Usage

1
pointsWithin(pos, ranges)

Arguments

pos

Dataframe with chr and pos columns

ranges

Dataframe with chr, start, and end columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
snp1 <- data.frame(
    'chr' = 'chr1',
    'pos' = 7
    )
cnv <- data.frame(
    'chr' = c('chr1', 'chr2', 'chr3'),
    'startPos' = c(5, 0, 1),
    'endPos' = c(100, 20000, 2)
    )
pointsWithin(snp1, cnv)

# no hits
snp2 <- data.frame(
    'chr' = 'chrX',
    'pos' = 7
    )
pointsWithin(snp2, cnv)

JEFworks/badger documentation built on May 7, 2019, 7:40 a.m.