Description Usage Format Fields Methods Examples

The multiplication of two terms, as an ASTNode.

1 |

`R6Class`

object.

`left`

The AST tree to the left.

`right`

The AST tree to the right.

`new(left, right)`

Create addition node of given left and right node.

`terms()`

Returns the node as a term vector

`factors()`

Returns all terminal nodes under this as a list

`distribute()`

Applies the distributive property to the node, and returns the resulting node. This is the actual workhorse of the disributing multiplication across the tree.

`string()`

Returns the string formula of the node

`reduce(data)`

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

1 | ```
ASTMultiply$new(ASTVariable$new("x"), ASTVariable$new("y"))$string()
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.