int_info: Create start/end times and interval information

Description Usage Arguments Value See Also Examples

Description

Given interval breaks points, returns data frame with information on interval start time, interval end time, interval length and a interval factor variable (left open intervals). If object of class ped is provided, extracts unique interval information from object.

Usage

1
2
3
4
5
6
7
int_info(x, ...)

## Default S3 method:
int_info(x, min.time = 0L, ...)

## S3 method for class 'ped'
int_info(x, ...)

Arguments

x

A numeric vector of cut points in which the follow-up should be partitioned in or object of class ped.

...

Currently ignored.

min.time

Only intervals that have lower borders larger than this value will be included in the resulting data frame.

Value

data.frame. A data frame containing the start and end times of the intervals specified by the x argument. Additionally the interval length, interval mid-point and a factor variable of the intervals themselves.

See Also

split_data

Examples

1
2
3
4
int_info(c(1, 2.3, 5))
tdf <- data.frame(time=c(1, 2.3, 5), status=c(0, 1, 0))
ped <- split_data(Surv(time, status)~., data=tdf, id="id", max.end=TRUE)
int_info(ped)

adibender/pam documentation built on May 10, 2019, 5:54 a.m.