Learn R Programming

latrend (version 1.2.1)

clusterSizes: Number of trajectories per cluster

Description

Obtain the size of each cluster, where the size is determined by the number of assigned trajectories to each cluster.

Usage

clusterSizes(object, ...)

Arguments

object

The lcModel object.

...

Arguments passed on to trajectoryAssignments

Value

A named integer vector of length nClusters(object) with the number of assigned trajectories per cluster.

Details

The cluster sizes are computed from the trajectory cluster membership as decided by the trajectoryAssignments() function.

See Also

clusterProportions trajectoryAssignments

Examples

Run this code
# NOT RUN {
data(latrendData)
model <- latrend(lcMethodKML("Y", id = "Id", time = "Time"), latrendData)
clusterSizes(model)
# }

Run the code above in your browser using DataLab