inspect_numberid: Inspect if a number has the expected length

View source: R/inspect_numberid.R

inspect_numberidR Documentation

Inspect if a number has the expected length

Description

Check whether a given numeric value has the expected number of digits.

Usage

inspect_numberid(number, expected_length)

Arguments

number

A numeric value.

expected_length

An integer specifying the expected number of digits.

Value

A logical value: 'TRUE' if 'number' has the expected length and consists only of digits, otherwise 'FALSE'.

Examples

inspect_numberid(12345, 5)  # TRUE - 5 digits
inspect_numberid(1234, 5)    # FALSE - 4 digits

trustmebro documentation built on June 8, 2025, 11:01 a.m.