cut_surv: Limit event and survival times to a time point

View source: R/cut_surv.R

cut_survR Documentation

Limit event and survival times to a time point

Description

[Experimental]

Usage

cut_surv(data, event, time, at, cuttime = TRUE, rename = NULL, censval = NULL)

Arguments

data

Data.

event

Event that should be cut.

time

Time that should be cut. See also cuttime.

at

At what time point should event/time be cut? In units of time.

cuttime

Should time be cut? (can be needed for later evaluation). Default is TRUE.

rename

Suffix if event and time should be renamed. Default is not to rename.

censval

Value of censoring in variable event. If not given the function will use 0 if event is numeric or "No" if event is character or factor if these exist in event.

Value

Data with cut event and time variable.

Examples

rs_data <- cut_surv(rs_data, out_death_fac, outtime_death, at = 365, rename = "1yr")

linabe/hfmisc documentation built on Oct. 10, 2022, 3:17 p.m.