d_node: Create a decision node.

Description Usage Arguments Value See Also Examples

Description

d_node returns a decision node that takes the max value of it's children as its value. A decision node can have multiple children.

Usage

1
d_node(children, name = "Decision")

Arguments

children

List. A list of nodes that are the alternatives of this decision.

name

Character. The name of this outcome

Value

A node (list) that has a value, name, and the selected decision.

See Also

Other node generating functions: o_node, u_node

Examples

1
2
3
4
5
6
7
# Generate a list of some outcome nodes to be children
children <- list(
  o_node(v = -10, name = "Rain"),
  o_node(v = 10, name = "Sunny")
)
d <- d_node(children = children, name = "Weather")
str(d)

jongbinjung/datree documentation built on May 19, 2019, 7:30 p.m.