seqhandbook (version 0.1.0)

seq_heatmap: Index plot of sequences ordered according to a dendrogram

Description

Index plot of state sequences. Sequences are ordered according 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

See Also

seqIplot

Examples

Run this code
if (require(TraMineR)) {
  data(mvad)
  mvad.seq <- seqdef(mvad[,17:86])
  mvad.lcs <- seqdist(mvad.seq, method = "LCS")
  mvad.hc <- hclust(as.dist(mvad.lcs), method = "ward.D2")
  seq_heatmap(mvad.seq, mvad.hc)
}

Run the code above in your browser using DataLab