plotKM {TNBC.CMS}R Documentation

Subtype-specific survival curves

Description

Produces Kaplan-Meier survival curves for each subtype.

Usage

plotKM(pred, time, event)

Arguments

pred

A vector of predicted consensus molecular subtypes.

time

A vector of the follow-up time.

event

A vector representing survival status (0 = alive, 1 = dead).

Value

A ggplot object.

Examples

# Load clinical information of TNBC samples
data(GSE25055)
DFS.status <- colData(GSE25055)$DFS.status
DFS.month <- colData(GSE25055)$DFS.month

# Predict consensus molecular subtypes of TNBC samples
prediction <- predictCMS(expr = GSE25055)

# Plot Kaplan-Meier curves for each subtype
plotKM(pred = prediction, time = DFS.month, event = DFS.status)

[Package TNBC.CMS version 1.6.0 Index]