medtab | R Documentation |
This function creates a summary table from a survfit object including median survival estimates with CIs. It returns a dataframe and prints a table using kable or htmlTable.
medtab(
sfit,
groups = NA,
grlabs = NA,
grcolname = "Group",
med.dec = 2,
medlab = "Median survival time",
printorig = TRUE,
kable = TRUE,
htmlTable = FALSE
)
sfit |
Survfit object (REQUIRED). |
groups |
Character vector for groups as listed in dataset. Default = NA (no groups). |
grlabs |
Character vector for group names, must be in same order as groups. Default = NA (no groups or use group levels from dataset). |
grcolname |
Character label for group column. Default = "Group". |
med.dec |
Number of decimal places to report for median survival time. Default = 2. |
medlab |
Character label for median and CI columns. Default = "Median survival time". |
printorig |
Logical indicator to print original summary of survfit object for checking purposes. Default = TRUE. |
kable |
Logical. Indicator to use kable to display table. Default = TRUE. |
htmlTable |
Logical. Indicator to use htmlTable package to display table instead of kable Default = FALSE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.