int_info: Create start/end times and interval information

Description Usage Arguments Value Examples

View source: R/interval_info.R

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
int_info(x, ...)

## Default S3 method:
int_info(x, right_closed = TRUE, min_time = 0L, ...)

Arguments

x

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

...

Currently ignored.

right_closed

Logical. If TRUE (default), intervals are assumed right_closed closed and left open. If FALSE left closed and right_closed open.

min_time

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

Value

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.

Examples

1
2
## create interval information from cut points
int_info(c(1, 2.3, 5))

adibender/ldatools documentation built on March 7, 2020, 5:30 a.m.