size {intervals} | R Documentation |
Compute the size, in either Z or R as appropriate, for each interval in an interval matrix.
## S4 method for signature 'Intervals' size(x, as = type(x)) ## S4 method for signature 'Intervals_full' size(x, as = type(x))
x |
An |
as |
Should the intervals be thought of as in Z or R? This is usually
determined automatically from the |
For type "Z"
objects, counting measure; for type "R"
objects, Lebesgue measure. For type "Z"
objects, intervals of
form (a,a] and (a,a) are both of length
0.
A numeric vector with length equal to nrow(x)
.
See empty
to identify empty intervals. Note that when
type(x) == "R"
, a size of 0 does not imply that an interval is
empty.
z1 <- Intervals( cbind( 1, 1:3 ), type = "Z" ) z2 <- z1; closed(z2)[1] <- FALSE z3 <- z1; closed(z3) <- FALSE size(z1) size(z2) size(z3) r1 <- z1; type(r1) <- "R" r2 <- z2; type(r2) <- "R" r3 <- z3; type(r3) <- "R" size(r1) size(r2) size(r3) s1 <- Intervals_full( matrix( 1, 3, 2 ), type = "Z" ) closed(s1)[2,2] <- FALSE closed(s1)[3,] <- FALSE size(s1)