surv_table: Create survfit table

Description Usage Arguments Value

View source: R/surv_table.R

Description

Use this to create a table for survival analysis. Creates a data.frame containing sample size, number of events, median survival time, and 95% CI between by groups.

Usage

1
surv_table(data, time, event, by)

Arguments

data

data frame that contains time to event, event, and by variables required to create survfit object

time

Time variable

event

Event variable

by

By variable

Value

This function returns a data.frame containing a column for each level of the by variable and the pvalue with rows "N", "Events" (# events), "Median" (median survival time), "95% CI" (for median survival time).


sjacobson94/clinicaltrials documentation built on Oct. 27, 2020, 6:43 p.m.