Learn R Programming

OneSampleLogRankTest (version 0.9.2)

plotKM: Plot Kaplan-Meier Curve against Population

Description

Plot Kaplan-Meier Curve against Population

Usage

plotKM(dataSurv, dataPop, type = c("exact", "approximate"))

Value

ggplot object

Arguments

dataSurv

Survival data

dataPop

Population data

type

Type of test to conduct in order to display p-value

Examples

Run this code
# load data
data(dataSurv_small)
data(dataPop_2018_2021)

plotKM(dataSurv_small, dataPop_2018_2021, type = "exact")

Run the code above in your browser using DataLab