check_km_curve: Check KM curve for validity

View source: R/kmplotting_helpers.R

check_km_curveR Documentation

Check KM curve for validity

Description

Checks that a Kaplan-Meier curve is valid (values in [0,1], non-increasing).

Usage

check_km_curve(S.KM, group_name = "Group", stop_on_error = TRUE)

Arguments

S.KM

Numeric vector of survival probabilities.

group_name

Character; name of the group.

stop_on_error

Logical; whether to stop on error (default TRUE).

Value

None. Stops or warns if invalid.


weightedsurv documentation built on Dec. 23, 2025, 1:07 a.m.