pin_ctrl {sweidnumbr}R Documentation

Check control number from pin

Description

Calculates the control number using the Luhn algorithm and compare it with the control number in the personal identity number.

Usage

pin_ctrl(pin, force_logical = FALSE)

Arguments

pin

A vector of class pin. See as.pin.

force_logical

If TRUE, force all NA in pin to be FALSE. Default is FALSE.

Value

Logical vector indicating if a pin is correct (TRUE) or not (FALSE)

References

Examples

# Examples taken from SKV 704 (see references)
ex_pin <- c("196408233234", "196408233235")
pin_ctrl(ex_pin)


[Package sweidnumbr version 1.5.0 Index]