Learn R Programming

exams.forge (version 1.0.10)

equal: Conditional Value Matching

Description

It performs a comparison by checking if either abs(x - y) < tol when outer == FALSE, or if an a exists or a y[j] for each x[i] such that the condition abs(x[i] - y[j]) < tol is satisfied.

Usage

equal(x, y, tol = 1e-06, outer = FALSE)

approx_equal(x, y, tol = 1e-06, outer = FALSE)

Value

logical

Arguments

x

numeric

y

numeric

tol

numeric: tolerance (default: 1e-6)

outer

logical: compares directly or verifies whether x is present within y (default: FALSE).

Examples

Run this code
equal(9*1/9, 1)

Run the code above in your browser using DataLab