valid_nhs | R Documentation |
Check if NHS numbers are valid based on the checksum algorithm
This uses the first 9 digits, multiplied by 10 down to 2 eg digit 1x10, d2x9
The sum of the products of the first 9 digits are divided by 11
The remainder is checked against the 10th digit
Where the remainder is 11, it is replaced with 0
valid_nhs(nhs_number)
nhs_number |
a vector |
a vector, 1 if NHS number is valid, 0 if not valid
test <- floor(runif(1000,1000000000,9999999999))
valid_nhs(test)
valid_nhs(9434765919)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.