time_intervals {hesim} | R Documentation |
Time intervals
Description
Create a table of time intervals given a vector or data frame of unique times. This would typically be passed to id_attributes.
Usage
time_intervals(times)
Arguments
times |
Either a vector of starting times for each interval or a
|
Value
An object of class time_intervals
that inherits from
data.table
in the same format as time_intervals
as
described in id_attributes.
See Also
Examples
time_intervals(c(0, 3, 5))
time_intervals(data.frame(time_start = c(0, 3, 5),
time_cat = c("Time <= 3", "3 < Time <= 5",
"Time > 5")))
[Package hesim version 0.5.4 Index]