decompose_cnp {rocnp} | R Documentation |
Split the CNP into its components
Description
A CNP is made up of 13 digits each with a specific meaning:
* S
- the first digit is indicative of gender
* AA
- digits 2-3 represent the last 2 digits of the year of birth
* LL
- digits 4-5 represent the month of birth
* ZZ
- digits 6-7 represent the day of birth
* JJ
- digits 8-9 represent the county of birth (for native Romanians)
or the county of issue (for residents)
* NNN
- digits 10-12 number between 001 and 999 used to differentiate
between people born on the same day in the same county
* C
- digit 13 checksum
Usage
decompose_cnp(cnp)
Arguments
cnp |
a 13-digit number (or a vector of 13-digit numbers) representing the Personal Numeric Code - CNP |
Value
a named character vector splitting the CNP into its components.
Examples
decompose_cnp(6201206018078)
decompose_cnp(5201206346491)
[Package rocnp version 0.1.0 Index]