R/VerifyCheckDigit.R

Defines functions VerifyCheckDigit

Documented in VerifyCheckDigit

VerifyCheckDigit <- function(x, method) {
    stopifnot(is.character(x) & is.character(method) & length(method) == 1)

    FUN <- sprintf('VerifyCheckDigit.%s', method)

    if (exists(FUN) && is.function(get(FUN))) {
        eval(call(FUN, x))
    } else {
        stop(sprintf('Method "%s" has not been implemented.', method))
    }
}

Try the CheckDigit package in your browser

Any scripts or data that you put into this service are public.

CheckDigit documentation built on May 1, 2019, 7:59 p.m.