## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>", fig.width = 6, fig.height = 4)

## ----clustering---------------------------------------------------------------
library(rEMM)
data("EMMsim")

set.seed(1234)
cl <- kmeans(EMMsim_train, centers = 10)
cl

## ----trac---------------------------------------------------------------------
emm <- TRAC(cl)
emm

## ----plot, fig.cap="Clusters and learned transitions from the ordered sequence."----
plot(emm, method = "MDS")

## ----assignments--------------------------------------------------------------
emm_from_labels <- TRAC(cl$cluster, data = EMMsim_train)
emm_from_labels

