surv_plot_km: This function plots KM curves for a categorical variable of...

View source: R/surv_plot_km.R

surv_plot_kmR Documentation

This function plots KM curves for a categorical variable of interest

Description

Calls survminer::ggsurvplot to create KM curves

Usage

surv_plot_km(data, var, age_death, event, ...)

Arguments

data

the dataframe that will be plotted

var

a string specifying the variable name to stratify the plots

age_death

a string specifying the age of death variable

event

a string specifying the status of the event 0=alive, 1=dead

...

other named arguments to pass to ggsurvplot function

Value

a km ggplot

Author(s)

William Mueller, Eric Shiroma


wfmueller29/SLAM documentation built on April 5, 2025, 5:09 a.m.