Learn R Programming

tangram (version 0.8.2)

ASTNode: A Node in an Abstract Syntax Tree (AST)

Description

A Node in an Abstract Syntax Tree (AST)

A Node in an Abstract Syntax Tree (AST)

Arguments

Public fields

format

Any formatting directive passed to this node.

value

A string of addtional information contained by the node.

Methods


Method terms()

Returns this node

Usage

ASTNode$terms()


Method distribute()

Distributes data across multiplications and rearranges nodes

Usage

ASTNode$distribute()


Method string()

Returns string representation of node

Usage

ASTNode$string()


Method reduce()

Given a set of data, associates it with AST nodes

Usage

ASTNode$reduce(data)

Arguments

data

(data.frame) data to associate across nodes


Method set_format()

Override the formatting directive for this node

Usage

ASTNode$set_format(x)

Arguments

x

(numeric,character) the formatting directive


Method clone()

The objects of this class are cloneable with this method.

Usage

ASTNode$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

This is the root R6 class of any term of the AST which is created when parsing a table formula. This should only be used as a base class as the class information carries the semantic meaning of a given node.