Learn R Programming

latrend (version 1.3.0)

plot-lcModel-method: Plot a lcModel

Description

Plot a lcModel object. By default, this plots the cluster trajectories of the model, along with the training data.

Usage

# S4 method for lcModel
plot(x, y, ...)

Arguments

x

The lcModel object.

y

Not used.

...

Arguments passed on to plotClusterTrajectories

object

The (cluster) trajectory data.

Value

A ggplot object.

See Also

plotClusterTrajectories plotFittedTrajectories plotTrajectories ggplot2::ggplot

Examples

Run this code
# NOT RUN {
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData, nClusters = 3)

if (require("ggplot2")) {
  plot(model)
}
# }

Run the code above in your browser using DataLab