Learn R Programming

diyar (version 0.2.0)

predefined_tests: User defined tests

Description

A collection of predefined logical tests for sub_criteria

Usage

exact_match(x, y)

range_match(x, y, range = 10)

range_match_legacy(x, y)

Arguments

x

Every value of an attribute to compare in links.

y

One value to which is compared against all other values of the same attribute (x)

range

Difference between y and x.

Examples

Run this code
# NOT RUN {
library(diyar)

# `exact_match` - test that `x` is equal to `y`
exact_match(x = 1, y = "1")
exact_match(x = 1, y = 1)

# `range_match` - test that `y` is between `x` and `x + range`
range_match(x = 10, y = 16, range = 6)
range_match(x = 16, y = 10, range = 6)

# `range_match_legacy` - test that `x` (10) is within `y` (16 - 10)
x_nl <- number_line(10, 16, gid = 10)
y_nl <- number_line(16, 10)

range_match_legacy(x = x_nl, y = y_nl)

# }

Run the code above in your browser using DataLab