VerifyCheckDigit {CheckDigit}R Documentation

Verify whether a value ends with a valid check digit

Description

Verify whether a value ends with a valid check digit

Usage

VerifyCheckDigit(x, method)

Arguments

x

character vector of values to verify

method

a character value naming the check digit algorithm to use

Details

See CheckDigit-package for a list of available methods.

Value

logical vector the same length as x

See Also

AppendCheckDigit, CheckDigit-package

Examples

VerifyCheckDigit('12340', 'Verhoeff')  # TRUE
VerifyCheckDigit('21340', 'Verhoeff')  # FALSE
VerifyCheckDigit('13240', 'Verhoeff')  # FALSE
VerifyCheckDigit('12430', 'Verhoeff')  # FALSE
VerifyCheckDigit('12304', 'Verhoeff')  # FALSE

[Package CheckDigit version 0.1-1 Index]