chk_interval_diff_ge_one: Check that difference between upper and lower limits of...

Description Usage Arguments Examples

View source: R/chk-composite.R

Description

Check applies to intervals with labels that have a "low-up" format, ie not single-year age groups, not open age groups or cohorts, and not missing.

Usage

1
2
3
4
5
6
7
chk_interval_diff_ge_one(int_low, int_up, is_low_up, labels)

chk_interval_diff_gt_one(int_low, int_up, is_low_up, labels)

err_interval_diff_ge_one(int_low, int_up, is_low_up, labels)

err_interval_diff_gt_one(int_low, int_up, is_low_up, labels)

Arguments

int_low

An integer vector. The lower breaks for the intervals.

int_up

An integer vector. The upper breaks for the intervals.

is_low_up

Logical. Whether label has "low-up" format, eg "15-19".

labels

A vector of interval labels.

Examples

1
2
3
4
chk_interval_diff_gt_one(int_low = c(0, 1, 5, 10),
                         int_up = c(1, 5, 10, NA),
                         is_low_up = c(TRUE, TRUE, TRUE, FALSE),
                         labels = c("0", "1-4", "5-9", "10+"))

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