VerifyCheckDigit: Verify whether a value ends with a valid check digit

Description

Verify whether a value ends with a valid check digit

Usage

1
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

1
2
3
4
5
VerifyCheckDigit('12340', 'Verhoeff')  # TRUE
VerifyCheckDigit('21340', 'Verhoeff')  # FALSE
VerifyCheckDigit('13240', 'Verhoeff')  # FALSE
VerifyCheckDigit('12430', 'Verhoeff')  # FALSE
VerifyCheckDigit('12304', 'Verhoeff')  # FALSE

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.