chk_lengths_elements_equal_vec: Check that 'x2' gives the lengths of the elements of 'x1'

Description Usage Arguments Examples

View source: R/chk-composite.R

Description

Check that 'x2' gives the lengths of the elements of 'x1'

Usage

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

err_lengths_elements_equal_vec(x1, x2, name1, name2)

Arguments

x1

A list.

x2

An integer vector, the same length as x1.

name1

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

name2

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

Examples

1
2
3
4
x1 <- list(1:4, 1:2, 1:3)
x2 <- c(4L, 2L, 3L)
chk_lengths_elements_equal_vec(x1 = x1, x2 = x2,
                               name1 = "x1", name2 = "x2")

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