View source: R/followup_time.R
followup_time | R Documentation |
Function accepts survival::Surv()
object, extracts the follow-up
times among the censored observations, and returns the requested
summary statistics. Use this function to report follow-up in-line in
R Markdown reports.
followup_time(
Surv,
data = NULL,
pattern = "{median} (IQR {p25}, {p75})",
style_fun = gtsummary::style_sigfig
)
Surv |
An object of class |
data |
A data frame |
pattern |
Statistics pattern to return. Default is
|
style_fun |
Function used to style/format the summary statistics.
Default is |
string of summary statistics
library(survival)
followup_time(Surv(time, status), data = lung)
followup_time(
Surv(time, status), data = lung,
pattern = "{median} days",
style_fun = ~gtsummary::style_sigfig(., digits = 4)
)
followup_time(
survival::Surv(time, status),
data = survival::lung,
pattern = "{n} events with a follow-up time of {median} days (IQR {p25}, {p75})"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.