View source: R/followup_time.R
followup_time  R Documentation 
Function accepts survival::Surv()
object, extracts the followup
times among the censored observations, and returns the requested
summary statistics. Use this function to report followup inline 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 followup 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.