Learn R Programming

tangram (version 0.8.2)

ASTPlus: The addition of two terms, in an ASTNode.

Description

The addition of two terms, in an ASTNode.

The addition of two terms, in an ASTNode.

Arguments

Format

R6Class object.

Super classes

tangram::ASTNode -> tangram::ASTBranch -> ASTPlus

Public fields

data

Just returns the R6 name 'ASTPlus'

left

The node to the left of this node

right

The node to the right of this node

Methods

Inherited methods


Method new()

Construct a new node that represents addition

Usage

ASTPlus$new(left, right)

Arguments

left

(ASTNode) Node on the left side of the addition

right

(ASTNode) Node on the right side of the addition


Method terms()

Returns a vector of the left and right terms

Usage

ASTPlus$terms()


Method string()

A reparsable string representation of this node.

Usage

ASTPlus$string()


Method clone()

The objects of this class are cloneable with this method.

Usage

ASTPlus$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
ASTPlus$new(ASTVariable$new("x"), ASTVariable$new("y"))$string()

Run the code above in your browser using DataLab