Luhn's Algorithm is used as a checksum for credit card numbers or similar identifiers. It can detect single-digit changes and swapped digits. It consists of four steps:
More information can be found on https://en.wikipedia.org/wiki/Luhn_algorithm or in ISO/IEC 7812-1.
Your function takes the original numbers as a character vector, and it has to return a character vector that includes the checksum.