insertInterval: insertInterval

Description Usage Arguments Value Examples

Description

Method for inserting an interval into an IntervalTree object. Given an ordered pair of numbers denoting the start and end of an interval, the interval is first converted into an Interval object, then the Interval object is inserted by calling the insert() function.

Usage

1
insertInterval(theObject, anInterval)

Arguments

theObject

an IntervalTree object

anInterval

an interval in the form of (name, start, end).

Value

an IntervalTree object.

Examples

1
2
3
4
m_ranges <- data.frame(c("A", "B", "C", "D"), c(-1.1,2,3,4), c(5,4,6,10))
m_interval_tree <- new("IntervalTree", data=m_ranges, root=list())
m_interval_tree <- insertInterval(m_interval_tree, c("testInterval1", 2, 5))
res <- insertInterval(m_interval_tree, c("a",2.5,7))

rIntervalTree documentation built on May 2, 2019, 3:04 a.m.