plot_surv_curve: Plot individual survival curve (Kaplan Meier)

View source: R/survival.R

plot_surv_curveR Documentation

Plot individual survival curve (Kaplan Meier)

Description

Plot individual survival curve (Kaplan Meier)

Usage

plot_surv_curve(
  df,
  descr = "",
  out_dir = ".",
  line_colors = NULL,
  save.to.file = F
)

Arguments

df

A data frame with 3 columns: time, status (censoring), col (variable to stratify by)

descr

A string description/label for file names and plot title; could be strata name

out_dir

The output directory where the plot will be saved, default is current working directory.

line_colors

A named vector for colors - names=variable/strata and values=hex codes.

save.to.file

A logical indicating whether to save to out_dir (T) or print to panel (F)


kazeera/hourglass documentation built on April 5, 2025, 7:18 a.m.