evaluate: Evaluate the value of a node

Description Usage Arguments Value See Also Examples

Description

evaluate uses lazyeval to evaluate the value function of any given node. Essentially a shortcut for calling lazyeval::f_eval on the $value object of a node.

Usage

1
evaluate(node, data = NULL, verbose = FALSE)

Arguments

node

Node list. The node to evaluate.

data

List-like. The data to be used when evaluating the value function. Depending on the value function, omitting the data may result in an error.

verbose

Logical. Whether or not to print the full value formula.

Value

Evaluated numeric value.

See Also

Other node processing functions: decide

Examples

1
2
3
4
v <- o_node(v = ~ .data$x + y)
y <- 10
evaluate(v, data = list(x = 10))
evaluate(v, data = list(x = 1))

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