guess_fc: Guess Italian Fiscal Code

View source: R/guess_fc.R

guess_fcR Documentation

Guess Italian Fiscal Code

Description

The function tries to guess regular fiscal code, extracting relevant alphanumeric digits from surname, name, birth date, gender and 'codice catastale' (computing the last character, the control digit).

Usage

guess_fc(
  surname = NULL,
  name = NULL,
  birth_date = NULL,
  female = NULL,
  codice_catastale = NULL
)

Arguments

surname

character, surname

name

character, names

birth_date

Date, date of birth

female

logical, female indicator variable (FALSE = man, TRUE = woman)

codice_catastale

Italian 'codice catastale' (an identifier) of the 'comune' of birth

Value

The function return a character vector of fiscal code.

Examples


## using fictious data
Surnames <- c("Rossi", "Bianchi")
Names <- c("Mario", "Giovanna")
Birthdates <- as.Date(c("1960-01-01", "1970-01-01"))
Female <- c(FALSE, TRUE)
Comune_of_birth <- c("F205", # milan
                     "H501") # rome
guess_fc(Surnames, Names, Birthdates, Female, Comune_of_birth)


lbraglia/ifctools documentation built on Aug. 31, 2023, 5:43 a.m.