data(PAP.adh)
if (require("ggplot2")) {
plotTrajectories(PAP.adh, id = "Patient", time = "Week", response = "UsageHours")
# plot according to cluster ground truth
plotTrajectories(
PAP.adh,
id = "Patient",
time = "Week",
response = "UsageHours",
cluster = "Group"
)
}
Run the code above in your browser using DataLab