ASTFunction | R Documentation |
A specified function call as an ASTNode
A specified function call as an ASTNode
R6Class
object.
tangram::ASTNode
-> ASTFunction
r_expr
A string containing the raw r expression from inside the parenthesis
data
Data stored as a result of reduction
new()
Construct a node representing a function call
ASTFunction$new(value, r_expr)
value
(character) The name of the function call
r_expr
Any r expression to be evaluated inside the call
factors()
Returns all terminal nodes, this is a terminal node so returns self
ASTFunction$factors()
name()
Returns the function call as character
ASTFunction$name()
string()
Returns a re-parsable representation of the node
ASTFunction$string()
reduce()
Given a data.frame execute the function in that environment and associate the result as data.
ASTFunction$reduce(data)
data
(data.frame) The data.frame to use as the enviroment for the function execution
clone()
The objects of this class are cloneable with this method.
ASTFunction$clone(deep = FALSE)
deep
Whether to make a deep clone.
ASTFunction$new("log", "x+2")$string()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.