Skip to contents

Checking validity of cpr number. Vectorised.

Usage

cpr_check(cpr)

Arguments

cpr

cpr-numbers as ddmmyy-.xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.

Value

Logical vector

Examples

fsd<-c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021")
cpr_check(fsd)
#> [1]  TRUE FALSE FALSE FALSE FALSE FALSE
all(cpr_check(fsd))
#> [1] FALSE