Description Usage Arguments Value Author(s) References See Also Examples
The function performs fiscal codes (both temporary and definitive) check, computing the last (control) character basing on the others. The algorithm is intended to be quite "draconian", so you'll better make some precleaning (remove blank spaces and upcase) if needed. See examples.
1 | fc.check(fc)
|
fc |
A character vector of fiscal codes. |
The function return TRUE
if the fiscal code is wrong,
FALSE
otherwise.
Luca Braglia <lbraglia@gmail.com>
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## As i've said, the algo is quite draconian. Consider the code
## "QWEASD34D12H221M" (fictitious but right). I would like
## "qWeASd34D12h 221M " to be (and it's) TRUE, because i consider it
## as an error (it's diminishing match probability).
fc.check("qWeASd34D12h 221M ")
## So you'll betted do pre-cleaning (upcase and blank trimming)
fc <- c("qWeASd34D12h 221M ", "12312312312")
fc <- gsub(" ","", toupper(fc))
fc.check(fc)
## Check results with (i.e.)
## http://www.nonsolocap.it/codice-fiscale/controllo/
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.