Learn R Programming

utile.tools (version 0.2.7)

paste_efs: Paste event-free survival

Description

Creates a human-readable event-free-survival from a survfit object and a specified time point.

Usage

paste_efs(x, times, percent.sign = TRUE, digits = 1)

Value

A character vector of event free survival(s).

Arguments

x

A survfit object. The survival model.

times

A numeric. Indicates time-points of interest. Units are whatever was used to create the survival fit.

percent.sign

A logical. Indicates percent sign should be printed for frequencies.

digits

Integer. Number of digits to round to.

Examples

Run this code
library(survival)

fit <- survfit(Surv(time, status) ~ 1, data = diabetic)
paste_efs(fit, c(1, 3, 5))

Run the code above in your browser using DataLab