% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotKM.R
\name{plotKM}
\alias{plotKM}
\title{Subtype-specific survival curves}
\usage{
plotKM(pred, time, event)
}
\arguments{
\item{pred}{A vector of predicted consensus molecular subtypes.}

\item{time}{A vector of the follow-up time.}

\item{event}{A vector representing survival status (0 = alive, 1 = dead).}
}
\value{
A \code{ggplot} object.
}
\description{
Produces Kaplan-Meier survival curves for each subtype.
}
\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)
}
