chk_length_same_or_1: Check that 'x1' and 'x2' have same (non-zero) length or has...

Description Usage Arguments See Also Examples

View source: R/chk-composite.R

Description

Check that 'x1' and 'x2' have same (non-zero) length or has length 1

Usage

1
2
3
chk_length_same_or_1(x1, x2, name1, name2)

err_length_same_or_1(x1, x2, name1, name2)

Arguments

x1

An object.

x2

An object.

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_length_equals,

Examples

1
2
3
4
5
6
7
x1 <- 1:5
x2 <- 2:6
chk_length_same_or_1(x1 = x1, x2 = x2,
                     name1 = "x1", name2 = "x2")
x2 <- 1L
chk_length_same_or_1(x1 = x1, x2 = x2,
                     name1 = "x1", name2 = "x2")

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