is_valid {nhsnumber} | R Documentation |
NHS numbers are 10 digit numbers where the 10th digit is a checksum. This function validates the checksums of the supplied NHS numbers.
is_valid(nhs_number, warn = TRUE)
nhs_number |
A vector of 10 digit NHS numbers to validate |
warn |
Boolean that controls display of warning messages |
A logical vector indicating the validity of each input value
is_valid(1234567881)
is_valid(c(1234567881, 1234512345, 123456789))
is_valid(1234567890, warn = FALSE)