powered by
pin
Calculates the control number using the Luhn algorithm and compare it with the control number in the personal identity number.
pin_ctrl(pin, force_logical = FALSE)
Logical vector indicating if a pin is correct (TRUE) or not (FALSE)
TRUE
FALSE
A vector of class pin. See as.pin.
If TRUE, force all NA in pin to be FALSE. Default is FALSE.
Skatteverket, Population registration in Sweden. SKV 717B. (2007)
Skatteverket, Personnummer. SKV 704. (2007) SOU 2008:60 : Personnummer och samordningsnummer, (2008)
# Examples taken from SKV 704 (see references) ex_pin <- c("196408233234", "196408233235") pin_ctrl(ex_pin)
Run the code above in your browser using DataLab