seq_heatmap: Index plot of sequences orderred according to a dendrogram

View source: R/sequences.R

seq_heatmapR Documentation

Index plot of sequences orderred according to a dendrogram

Description

Index plot of state sequences. Sequences are ordered accoring to the specified dendrogram. The dendrogram is also plotted on the side of the index plot.

Usage

seq_heatmap(seq, tree, with.missing = FALSE, ...)

Arguments

seq

a state sequence object created with the seqdef function

tree

a dendrogram of the sequences (an object of class hclust, dendrogram or agnes)

with.missing

is there a 'missing value' state in the sequences?

...

additional parameters sent to heatmap

Source

http://joseph.larmarange.net/?Representer-un-tapis-de-sequences

See Also

seqIplot

Examples

if (require(TraMineR) & require(cluster)) {
  data(mvad)
  mvad.seq <- seqdef(mvad[, 17:86])
  mvad.lcs <- seqdist(mvad.seq, method = "LCS")
  mvad.hc <- agnes(mvad.lcs, method = "ward")
  seq_heatmap(mvad.seq, mvad.hc)
  seqIplot(mvad.seq, sortv = cutree.order(mvad.hc, nrow(mvad.seq)))
}

larmarange/JLutils documentation built on March 24, 2023, 6:39 a.m.