chk_is_integer: Check that a scalar or vector has type integer

Description Usage Arguments See Also Examples

View source: R/chk-single.R

Description

Checking type, e.g. fails for 1.0. chk_is_integer_conse adds the condition that the integers be consecutive.

Usage

1
2
3
4
5
6
7

Arguments

x

A scalar or a vector.

name

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

See Also

chk_is_integer_equiv_scalar for looser integer test. chk_is_numeric to test for numeric type.

Examples

1
2
3
x <- 1:3
chk_is_integer(x, name = "x")
chk_is_integer_consec(x, name = "x")

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