surv2df | R Documentation |
Converts a survival object (class 'Surv') to a data frame with unique time points and event indicators. The function accounts for censoring, i.e. observations censored at a particular time point i do not appear at the time point i + 1.
surv2df(surv_object)
surv_object |
and instance of the 'Surv' class. |
a data frame with the following columns:
'time': unique time point inferred from the survival object.
'.observation': index of the observation in the input survival object.
'status': event index as indicated in the survival object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.