get_km_survival_curve {PMAPscore} | R Documentation |
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
#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)
[Package PMAPscore version 0.1.1 Index]