CegGraphSimple function

CegGraphSimple

CegGraphSimple

Simple ceg structure to be ploted in RGraphviz. This function yields a data structure corresponding a simplified CEG to be plotted using the package Rgraphviz.

CegGraphSimple(stratified.event.tree, position, range.color = 1)

Arguments

  • stratified.event.tree: stratified.event.tree S4 object
  • position: list an object ceg.position.
  • 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 positions.
  • node$variable (vector) - it identifies the variable asscoiated with each position.
  • node$color (vector) - color of each position. All positions coincident with a stage are depicted in white.
  • $edge - edge attributes
  • edgeedgeedges (list) - set of list that emanates from each position.
  • edge$label (vector) - position labels.
  • weight (vector) - edge weight.

Note

This function mitigates a limitation from Rgraphviz, which does not support plotting multiple edges between two nodes presenting the correct edge label for each one. The decision was to merge all edges in one, and presenting all labels in this resulting edge.#' This approach is temporary and not ideal, since the ceg is no more a multi-graph. However, the authors did not find a graphical package which provides the needed plotting features. Contributions are wellcomed.

  • Maintainer: Pier Taranti
  • License: GPL-2 | file LICENSE
  • Last published: 2017-11-27