Skip to contents

extract_time() gives the times of an event_time() vector, and extract_status() its status codes.

Usage

extract_time(x, ...)

extract_status(x, ...)

Arguments

x

An event_time() vector.

...

Unused.

Value

For extract_time(), a numeric vector of the times (the lower bounds for intervals). If any element is interval-censored, it's instead a matrix with columns time and time_max, where time_max is the upper bound of the intervals and missing elsewhere. For extract_status(), a character vector of the status codes.

Examples

x <- event_time(time = c(7, 5, 2), status = c("e", "r", "i"), time_max = c(NA, NA, 4))
extract_time(x)
#>      time time_max
#> [1,]    7       NA
#> [2,]    5       NA
#> [3,]    2        4
extract_status(x)
#> [1] "e" "r" "i"
extract_time(x[1:2])
#> [1] 7 5