Learn R Programming

ifctools (version 0.3.6)

guess_fc: 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
)

Value

The function return a character vector of fiscal code.

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

Examples

Run this code

## 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)

Run the code above in your browser using DataLab