Learn R Programming

TraMineR (version 1.6-2)

disstree2dot: Graphical representation of a dissimilarity tree

Description

Generate a "dot" file and associated images files that can be used in GraphViz to get a graphical representation of the tree.

Usage

disstree2dot(tree, filename, digits = 3,
   imagefunc = NULL, imagedata = NULL, imgLeafOnly = FALSE,
   devicefunc = "jpeg", imageext = "jpg", device.arg = list(),
   use.title = TRUE, label.loc = "main", node.loc = "main",
   split.loc = "sub", title.cex = 1, ...)

disstree2dotp(tree, filename,
   imagedata=NULL, imgLeafOnly=FALSE,
   imagefunc=plot, ...)

Arguments

tree
The tree to be plotted.
filename
A filename, without extension, that will be used to generate image and dot files.
digits
Number of significant digits to plot.
imagefunc
A function to plot the individuals in a node, see details.
imagedata
a data.frame that will be passed to imagefunc, see details.
imgLeafOnly
Logical: If TRUE, only terminal node will be plotted.
devicefunc
A device function, "jpeg" by default.
imageext
extension for image files.
device.arg
Argument passed to devicefunc.
use.title
Logical: If TRUE, node information will be printed using title command, see details.
label.loc
Location of the node label, see title for possible values.
node.loc
Node content location, see title for possible values.
split.loc
Split information location, see title for possible values.
title.cex
cex applied to all calls to title (see use.title).
...
other parameters that will be passed to imagefunc.

Value

  • Nothing but generates a file in the current working directory (see setwd).

Details

This function generates a "dot" file that can be used in GraphViz (http://www.graphviz.org). It also generates one image per node through a call to imagefunc passing the selected lines of imagedata if present or otherwise a list of indexes (of individuals belonging to a node). if use.title is TRUE, imagefunc should take care to leave enough space for the title. disstree2dotp is a simplified interface of disstree2dot. These functions are intended to be generic. See seqtree2dot for an even simpler version for state sequences objects.

See Also

disstree for an example.