chk_gt: Check that 'x1' is greater than 'x2'

Description Usage Arguments See Also Examples

Description

Check that 'x1' is greater than 'x2'

Usage

1
2
3
4
5
6
7
chk_gt_scalar(x1, x2, name1, name2)

chk_gt_vector(x1, x2, name1, name2)

err_gt_scalar(x1, x2, name1, name2)

err_gt_vector(x1, x2, name1, name2)

Arguments

x1

A scalar or vector.

x2

A scalar or vector the same length as x1, or length 1.

name1

The name for x1 that will be used in error messages.

name2

The name for x2 that will be used in error messages.

See Also

chk_ge, chk_le, chk_lt

Examples

1
2
3
4
5
6
7
8
9
x1 <- 3.2
x2 <- 3.1
chk_gt_scalar(x1 = x1, x2 = x2, name1 = "x1", name2 = "x2")
x1 <- c(3.2, 4.2, 5.7)
x2 <- c(3.1, 4.0, 4.2)
chk_gt_vector(x1 = x1, x2 = x2, name1 = "x1", name2 = "x2")
x1 <- c(3.2, 4.2, 5.7)
x2 <- 3.1
chk_gt_vector(x1 = x1, x2 = x2, name1 = "x1", name2 = "x2")

johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.