Learn R Programming

TraMineR (version 1.4-1)

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, ...)

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 used, typically jpeg
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 title call (see use.title
...
other parameters that will be passed to imagefunc

Value

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

Details

This function generates a "dot" file that can be used in GraphViz. It also generates one image per node through a call to imagefunc passing the selected lines of imagedata if present or a list of index (of individuals belonging to a node) if not. if use.title is TRUE, imagefunc should take care to leave enough space for title informations. This function is intended to be generic. See seqtree2dot for a much simpler version for states sequences objects.

See Also

disstree for example