predicates-relational: Relational predicates

Description Usage Arguments See Also Examples

Description

Relational predicates

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
chk_identical(x, to)

chk_not_identical(x, to)

chk_equal(x, to)

chk_not_equal(x, to)

chk_equivalent(x, to)

chk_not_equivalent(x, to)

chk_gt(x, lwr, na.rm = FALSE)

chk_lt(x, upr, na.rm = FALSE)

chk_gte(x, lwr, na.rm = FALSE)

chk_lte(x, upr, na.rm = FALSE)

Arguments

x

Object to test.

to

Reference object.

lwr, upr

Lower/upper bound.

na.rm

Should NA values be disregarded?

See Also

all.equal(), identical()

Examples

1
2
3
4
5
6
7
f <- function(x, y) log(y - x) / log(x)
foo <- firmly(f, chk_gt(0, x - 1, "y not greater than x" := y - x))
foo(2, 4)
## Not run: 
foo(1, 2)
foo(2, 2)
## End(Not run)

egnha/rong documentation built on May 7, 2019, 9:48 p.m.