std_km_group: Standard Kaplan-Meier curve by group

View source: R/kaplan_meier.R

std_km_groupR Documentation

Standard Kaplan-Meier curve by group

Description

A function to plot a Kaplan-Meier curve with groups.

Usage

std_km_group(
  time,
  status,
  var,
  var.label,
  xlab,
  ylab,
  time.points,
  risk.table,
  ...
)

Arguments

time

a numeric vector.

status

a numeric vector of '0' and '1'.

var

a character vector.

var.label

a character value specifying the group label.

xlab

a character value specifying the x axis label.

ylab

a character value specifying the y axis label.

time.points

a numeric vector of time points to evaluate the survival curves.

risk.table

a logical value indicating whether the risk table should be calculated.

...

additional input arguments that may be used when creating your own function.

Details

This function defines the standard of Kaplan-Meier curves with groups to be plotted by the function nt_km. It can be modified by the user.

Value

a ggplot object.


dnzmarcio/ntimes documentation built on Jan. 4, 2024, 2:23 p.m.