lcModel-make: Cluster-handling functions for lcModel implementations.

lcModel-makeR Documentation

Cluster-handling functions for lcModel implementations.

Description

Ensures a proper cluster assignments factor vector

Generates the requested number of cluster names. Uses the vector returned by getOption("latrend.clusterNames"), which returns the alphabet by default.

Usage

make.trajectoryAssignments(object, clusters)

make.clusterIndices(object, clusters)

make.clusterNames(n)

Arguments

object

The lcModel object.

clusters

The unprocessed trajectory cluster assignment vector.

n

The number of clusters.

Details

The latrend.clusterNames option may also return a function with signature (n), returning a vector of names of the correct length.

Value

Factor cluster assignments.

A cluster assignments index vector of type integer.

A character vector length n with the cluster names.


latrend documentation built on March 31, 2023, 5:45 p.m.