chk_is_numeric: Check that a scalar or vector has type numeric

Description Usage Arguments See Also Examples

View source: R/chk-single.R

Description

Checking type, e.g. fails for 1L.

Usage

1
2
3

Arguments

x

A scalar or a vector.

name

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

See Also

chk_is_integer to test for integer type.

Examples

1
2
x <- 1.0
chk_is_numeric(x, name = "x")

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