date_of_birth: Returns the date-of-birth from a CPR number

Description Usage Arguments Value Examples

Description

The first 6 digits of a CPR number contain the date-of-birth in a DDMMYY format. This format is not unique since only two digits are available for the year, and the exact century can be derived from the last 4 digits.

Usage

1

Arguments

cpr

A vector of CPR numbers strings

Value

A Date object with the date-of-births in YYYY-MM-DD format or NA if not a proper date

Examples

1
date_of_birth("2310450637")  # This is testing out a randomly generated number

ekstroem/DKcpr documentation built on May 25, 2019, 9:24 a.m.