CPR check
cpr_check.Rd
Checking validity of cpr number. Vectorised.
Arguments
- cpr
cpr-numbers as ddmmyy-.xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.
Examples
fsd<-c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021")
cpr_check(fsd)
#> OBS: according to new description, not all valid CPR numbers apply to this modulus 11 rule.
#> Please refer to: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
#> [1] TRUE FALSE FALSE FALSE FALSE FALSE
all(cpr_check(fsd))
#> OBS: according to new description, not all valid CPR numbers apply to this modulus 11 rule.
#> Please refer to: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
#> [1] FALSE