powered by
Calculates a single Verhoeff Check Digit. This function is exported, but it would usually be called from one of the `verhoeff_*` wrapper functions
calculate_digit(number, d5, d5_p, inv_v)
A number you want to calculate the check digit for
The verhoeff d5 matrix. Retrievable with create_verhoeff_matrices()$d5
The verhoeff p matrix. Retrievable with create_verhoeff_matrices()$d5_p
The verhoeff inv matrix. Retrievable with create_verhoeff_matrices()$inv_v
A single integer
# NOT RUN { dat <- verhoeff::create_verhoeff_matrices() calculate_digit(5, dat$d5, dat$d5_p, dat$inv_v) # }
Run the code above in your browser using DataLab