chk_le: Check that 'x1' is less than or equal to 'x2'

Description Usage Arguments See Also Examples

Description

Check that 'x1' is less than or equal to 'x2'

Usage

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

chk_le_vector(x1, x2, name1, name2)

err_le_scalar(x1, x2, name1, name2)

err_le_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_lt, chk_ge, chk_gt

Examples

1
2
3
4
5
6
7
8
9
x1 <- 2.2
x2 <- 3.1
chk_le_scalar(x1 = x1, x2 = x2, name1 = "x1", name2 = "x2")
x1 <- c(3.3, 4.2, 5.7)
x2 <- c(3.3, 4.6, 6.2)
chk_le_vector(x1 = x1, x2 = x2, name1 = "x1", name2 = "x2")
x1 <- c(3.3, 4.2, 5.7)
x2 <- 3.3
chk_le_vector(x1 = x1, x2 = x2, name1 = "x1", name2 = "x2")

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