TRAC | R Documentation |
Create an Markov model from a regular clustering (k-means or PAM) of sequence data.
TRAC(x, data = NULL, centers = NULL, measure = "euclidean")
x |
a clustering object (result of kmeans or PAM), a data set (a data matrix), or a vector with (integer) cluster assignments. |
data |
the data used for clustering (only used if |
centers |
if |
measure |
used distance measure. |
The order is inferred from the order in the original data set.
A EMM
object representing the clustering of sequence data.
data("EMMsim")
## using kmeans
cl <- kmeans(EMMsim_train, 10)
emm <- TRAC(cl)
emm
plot(emm, method = "MDS")
## using a cluster assignment vector (taken from the k-means clustering above)
x <- cl$cluster
emm <- TRAC(x, data = EMMsim_train)
emm
plot(emm, method = "MDS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.