insertInterval {rIntervalTree} | R Documentation |
insertInterval
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
insertInterval(theObject, anInterval)
Arguments
theObject |
an IntervalTree object |
anInterval |
an interval in the form of (name, start, end). |
Value
an IntervalTree object.
Examples
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))
[Package rIntervalTree version 0.1.0 Index]