seqtreedisplay: Graphical rendering of a sequence regression tree

Description Usage Arguments Details Value Author(s) See Also

Description

Generate a graphical representation of a regression tree of state sequence data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
seqtreedisplay(tree, filename = NULL, seqdata = tree$info$object,
  only.leaf = FALSE, sortv = NULL, diss = NULL, cex.main = 3,
  with.legend = "auto", cex.legend = cex.main, axes = FALSE,
  image.format = "png", with.quality = TRUE, cex.quality = cex.main,
  legend.text = NULL, show.tree = TRUE, show.depth = FALSE,
  imgLeafOnly, dist.matrix, title.cex, withlegend, legend.fontsize,
  imageformat, withquality, quality.fontsize, legendtext, showtree,
  showdepth, ...)

disstreedisplay(tree, filename = NULL, image.data= NULL, image.fun = plot,
  only.leaf = FALSE, cex.main = 3, image.format = "png",
  with.quality = TRUE, cex.quality = cex.main,
  legend.text = NULL, show.tree = TRUE, show.depth = FALSE,
  imagedata, imagefunc, imgLeafOnly, title.cex, imageformat,
  withquality, quality.fontsize, legendtext, showtree, showdepth, ...)

Arguments

tree

A seqtree object (as produced by seqtree) for seqtreedisplay. A disstree object (as produced by disstree) for disstreedisplay.

filename

The name of a file where to save the plot (overwritting existing file). If NULL, a temporary file is created.

seqdata

The sequence object containing the state sequences plotted in the nodes.

only.leaf

Logical. If TRUE sequences are plotted only in terminal nodes.

sortv

Argument passed to seqplot

diss

Argument passed to seqplot

cex.main

Node title magnification. See par.

with.legend

Logical. Should the color legend be displayed on the plot?

cex.legend

Legend magnification. See par. If not specified, use the value of cex.main.

axes

Argument passed to seqplot

image.format

Image format of the output file (filename)

with.quality

If TRUE, a node displaying fitting measures of the tree is added to the plot.

cex.quality

Fitting measure text magnification. See par. If not specified, use the value of cex.main.

legend.text

Character. Optional text information that should be added.

show.tree

Logical. Should the tree be shown on the screen?

show.depth

Logical. If TRUE, the splits are ordered according to their global pseudo-R2.

image.fun

A function to plot the individuals in a node, see details.

image.data

a data.frame that will be passed to image.fun.

imgLeafOnly

Deprecated. Use only.leaf instead.

dist.matrix

Deprecated. Use diss instead.

title.cex

Deprecated. Use cex.main instead.

withlegend

Deprecated. Use with.legend instead.

legend.fontsize

Deprecated. Use cex.legend instead.

imageformat

Deprecated. Use image.format instead.

withquality

Deprecated. Use with.quality instead.

quality.fontsize

Deprecated. Use cex.quality instead.

legendtext

Deprecated. Use legend.text instead.

showtree

Deprecated. Use show.tree instead.

showdepth

Deprecated. Use show.depth instead.

imagedata

Deprecated. Use image.data instead.

imagefunc

Deprecated. Use image.fun instead.

...

additional arguments passed to seqplot

Details

This function generates a tree image. For each node, it invokes seqplot for the selected lines of seqdata as argument. You should at least specify the type of the plot to use (type="d" for instance, see seqplot for more details).

The plot is actually not generated as an R plot, but with GraphViz (www.graphviz.org). Hence, seqtreedisplay only works when GraphViz is correctly installed.

Conversion to image formats other than "jpeg" or "png" is done using ImageMagick (www.imagemagick.org). To use this feature, ImageMagick (www.imagemagick.org) should hence also be installed.

Value

None

Author(s)

Matthias Studer (with Gilbert Ritschard for the help page)

See Also

See seqtree and disstree for examples, and disstree2dot for generating "dot" files.



Search within the TraMineR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.