surv_plot: Plot survival curves with number-at-risk table

Description Usage Arguments Examples

Description

Produce a survival curve plot and number-at-risk table using survminer::ggsurvplot and summarizer conventions.

Usage

1
surv.plot = function(df, dependent, explanatory, ...)

Arguments

df

Dataframe

dependent

Character vector of length 1: Survival object of the form Surv(time, status)

explanatory

Character vector of max length 2: quoted name(s) of explanatory variables

...

Arguments passed to survminer::ggsurvplot

Examples

1
2
3
4
5
6
# Survival plot
data(colon_s)
explanatory = c("perfor.factor")
dependent = "Surv(time, status)"
colon_s %>%
  surv.plot(dependent, explanatory, xlab="Time (days)", pval=TRUE, legend="none")

ewenharrison/summarizer documentation built on May 16, 2019, 9:41 a.m.