Calculate sex from pin

Share:

Description

Calculates the sex from the personal identification number.

Usage

1
pin_sex(pin)

Arguments

pin

A vector of class pin. See as.pin.

Value

Factor with label 'Male' and 'Female'.

References

Population registration in Sweden SKV 704 SOU 2008:60 : Personnummer och samordningsnummer

Examples

1
2
3
# Examples taken from SKV 704 (see references)
ex_pin <- c("196408233234", "186408233224")
pin_sex(ex_pin)