ASTFunction: A specified function call as an ASTNode

Description Usage Format Fields Methods Examples

Description

A specified function call as an ASTNode

Usage

1

Format

R6Class object.

Fields

value

The name of the function.

r_expr

A string containing the raw r expression from inside the parenthesis

Methods

new(value, r_expr)

Create one with the given value and r_expr

terms()

Returns the node

factors()

Returns self as a factor

distribute()

Applies the distributive property to the node, and returns the resulting node.

string()

Returns the string formula of the node

reduce(data)

Given a set of data, perform the logical reduction of the current node.

Examples

1
ASTFunction$new("log", "x+2")$string()

tangram documentation built on June 5, 2018, 1:04 a.m.