wrong_fc: Check Italian fiscal codes

Description

The function performs fiscal codes check (both regular and temporary ones), computing the last (control) character basing on the others. The algorithm is intended to be quite "draconian", so you'll better make some pre-cleaning (keep only alphabetic characters and uppercase) if needed. See examples.

Usage

1

Arguments

fc

A character vector of fiscal codes.

Value

The function return TRUE if the fiscal code is wrong, FALSE otherwise.

References

Law source: D.M. (Ministry of Finance) n. 13813 - 23/12/76 - "Sistemi di codificazione dei soggetti da iscrivere all'anagrafe tributaria". Supp. ord. G.U. 345 29/12/1976.

Examples

1
2
3
4
fc <- c(NA, "qWeASd34D12h 221M   ", " 12312312312 ")
wrong_fc(fc)
fc <- gsub(" ","", toupper(fc))
wrong_fc(fc)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.