
Last chance! 50% off unlimited learning
Sale ends in
Information on intervals in which times fall
get_intervals(x, times, ...)# S3 method for default
get_intervals(x, times, left.open = TRUE, rightmost.closed = TRUE, ...)
An object from which interval information can be obtained,
see int_info
.
A vector of times for which corresponding interval information should be returned.
Further arguments passed to findInterval
.
logical; if true all the intervals are open at left
and closed at right; in the formulas below, rightmost.closed
means ‘leftmost is closed’. This may
be useful, e.g., in survival analysis computations.
logical; if true, the rightmost interval,
vec[N-1] .. vec[N]
is treated as closed, see below.
A data.frame
containing information on intervals in which
values of times
fall.
# NOT RUN {
set.seed(111018)
brks <- c(0, 4.5, 5, 10, 30)
int_info(brks)
x <- runif (3, 0, 30)
x
get_intervals(brks, x)
# }
Run the code above in your browser using DataLab