iv_pairwise_span {ivs} | R Documentation |
Pairwise span
Description
iv_pairwise_span()
computes the pairwise "span" between the i-th interval
of x
and the i-th interval of y
. The pairwise span of two intervals is
a new interval containing the minimum start and maximum end of the original
intervals. It is similar to iv_pairwise_set_union()
, except it fills across
gaps.
Usage
iv_pairwise_span(x, y)
Arguments
x , y |
A pair of interval vectors. These will be cast to the same type, and recycled against each other. |
Value
An iv the same size and type as x
and y
.
Examples
x <- iv_pairs(c(1, 3), c(6, 8))
y <- iv_pairs(c(5, 7), c(2, 3))
# Can't take the set union when there are gaps
try(iv_pairwise_set_union(x, y))
# But you can compute the span of the intervals
iv_pairwise_span(x, y)
[Package ivs version 0.2.0 Index]