Skip to contents

plot_survival uses survival data for TCGA study and values of CNH to create plot exhibiting Kaplan Meier survival curves for two groups of samples: those with CNH below median and those with CNH above median. P-value for the log-rank test of equality of the survival curves is returned in the plot together with the number at risk table.

Usage

plot_survival(
  study_name,
  survival_time,
  survival_event,
  cnh,
  type,
  ylim = c(0, 1)
)

Arguments

study_name

name of TCGA study

survival_time

vector of survival times of subjects in the study

survival_event

vector of survival events for subjects in the study

cnh

vector of CNH values

type

string to be placed in legend (e.g., 'unfiltered CNH+')

ylim

permits to limit the y axis in survival plot

Value

ggsurvplot

See also

analyze_TCGA_study