data(latrendData)
if (require("ggplot2")) {
plotTrajectories(latrendData, id = "Id", time = "Time", response = "Y")
# plot according to the reference class
plotTrajectories(latrendData, id = "Id", time = "Time", response = "Y", cluster = "Class")
}
Run the code above in your browser using DataLab