equal: Test Equality of RStatic Objects

Description Usage Arguments Details Value Examples

View source: R/equal.R

Description

These functions and operators allow comparison of RStatic objects.

Usage

1
2
3
4
5
6
7
equal(x, y)

## S3 method for class 'ASTNode'
x == y

## S3 method for class 'ASTNode'
x != y

Arguments

x, y

(ASTNode) The objects to compare.

Details

These functions traverse the given RStatic objects to check that their children are also equal. Except for Symbol names and Literal values, fields that do not contain children are ignored.

Value

A logical scalar indicating the result of the comparison.

Examples

1
2
3
4
5
6
7
x = code_objects_ast(a <- 3)
y = code_objects_ast(a <- 3)
z = code_objects_ast(a <- 4)

x == y

y == z

nick-ulle/ast documentation built on Oct. 18, 2019, 4:37 a.m.