are_equal: Are objects equal?

View source: R/is_are.R

are_equalR Documentation

Are objects equal?

Description

A wrapper for all.equal that returns a logical scalar.

Usage

are_equal(x, y, check.names = T, check.attributes = T, ...)

Arguments

x

(any object) The first object.

y

(any object) The second object.

check.names

(lgl) Whether to check names (default yes).

check.attributes

(lgl) Whether to check attributes (default yes).

...

(other named parameters) Further parameters to pass to all.equal.

Value

Returns a logical scalar indicating whether the objects are equal.

Examples

are_equal(iris[1:4], iris[-5])
a = letters[1:3]
b = letters[1:3]
attr(b, "test") = "value"
are_equal(a, b)
are_equal(a, b, check.attributes = F)

Deleetdk/kirkegaard documentation built on April 22, 2024, 5:22 p.m.