Get the number of clusters estimated by the given object.

nClusters(object, ...)

# S4 method for class 'lcModel'
nClusters(object, ...)

Arguments

object

The object

...

Not used.

Value

The number of clusters: a scalar numeric non-zero count.

Examples

data(latrendData)
method <- lcMethodRandom("Y", id = "Id", time = "Time", nClusters = 3)
model <- latrend(method, latrendData)
nClusters(model) # 3
#> Error: unable to find an inherited method for function ‘nClusters’ for signature ‘object = "lcModelPartition"’