Learn R Programming

PMAPscore (version 0.1.1)

get_km_survival_curve: Plot Kaplan-Meier survival curve.

Description

The function `get_km_survival_curve` uses to draw the Kaplan-Meier survival curve.

Usage

get_km_survival_curve(km_data, cut_point, TRAIN = TRUE, risk.table = TRUE)

Arguments

km_data

A data frame, including survival status, survival time, and risk score of each sample. The data frame can be generated by the function `get_risk_score`.

cut_point

The threshold uses to classify patients into two subgroups with different OS.

TRAIN

Logical,if set to TRUE,the 'cut_point' is generated by the median of the risk score; Otherwise,'cut_point' can be customized.

risk.table

Allowed values include:TRUE or FALSE specifying whether to show or not the risk table. Default is FALSE.

Value

No return, plot the Kaplan-Meier survival curve.

Examples

Run this code
# NOT RUN {
#load the data.
data(km_data)
#perform the function `get_km_survival_curve`.
get_km_survival_curve(km_data,cut_point,TRAIN = TRUE,risk.table=TRUE)
# }

Run the code above in your browser using DataLab