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

Description Usage Arguments Details Value See Also Examples

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


Search within the CheckDigit package
Search all R packages, documentation and source code

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

Please suggest features or report bugs with the GitHub issue tracker.

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