treeFrameToList: 'treeFrameToList' Converts a 'tree' into a format usable in a...

View source: R/sankey.R

treeFrameToListR Documentation

treeFrameToList Converts a tree into a format usable in a sankeytree.

Description

treeFrameToList Converts a tree into a format usable in a sankeytree.

Usage

treeFrameToList(
  frame,
  xlevels,
  model,
  assigned,
  labels,
  max.tooltip.length = 150,
  numeric.distribution = TRUE,
  custom.color = "default",
  num.color.div = 101,
  const.bin.size = TRUE
)

Arguments

frame

The tree frame.

xlevels

Levels of depedent variables that are factors.

model

Data used by the model.

assigned

The nodes that the cases have been assigned.

labels

A vector of variable labels, named by the variable names.

max.tooltip.length

The maximum length of the tooltip (determines the scale of the tree).

numeric.distribution

Outputs additional diagnostics in the tooltip.

custom.color

Determines the colors of tree branches; if "default" generates tree colors using Q colors; if "sankey" use colors provided by sankeyTree package; or can provide a vector of hex strings as RGB values, for example custom.color = c("#aabbcc","#123456").

num.color.div

positive integer in the range [2,inf]. Controls the color resolution of the tree. A higher value gives a smoother color transition.

const.bin.size

logical; if true, each color spans an equal step of y-value or an equal number of points.


NumbersInternational/flipTrees documentation built on Feb. 26, 2024, 6:45 a.m.