TreeGraph function

TreeGraph

TreeGraph

A function to produce the data structure needed to plot Event and Staged trees using RGraphviz.

TreeGraph(tree, solution = list(), name = c(), range.color = 1)

Arguments

  • tree: Event.tree S4 object

  • solution: list with two components:

    • numeric - score associated with a level
    • list of vectors - stage structure
  • name: vector of strings - variable names

  • range.color: (numeric) - it chooses the palette. If 1, it is used a 8-color palette. If 2, it is used a 501-color palette.

Returns

list:

  • $node - node attributes

    • nodenodenodes (vector) - set of situations.
    • node$label (vector) - it identifies the variable asscoiated with each position.
    • node$color (vector) - color of each situation. All situations coincident with a stage are depicted in black.
  • $edge - edge attributes

    • edgeedgeedges (list) - set of list that emanates from each situation.
    • edge$label (vector) - edge labels.
  • Maintainer: Pier Taranti
  • License: GPL-2 | file LICENSE
  • Last published: 2017-11-27