Type: Package
Title: Check Validity of Greek AFM and PA Numbers
Version: 0.2.0
Author: Panagiotis Cheilaris [aut, cre]
Maintainer: Panagiotis Cheilaris <philaris@gmail.com>
Description: With the functions in this package you can check the validity of the Greek Tax Identification Number (AFM) and the Greek Personal Number (PA) https://pa.gov.gr. The PA is a new universal ID for Greek citizens across all public services and it is to replace older numbers issued by various Greek state agencies. Its format is a 12-character ID consisting of three alphanumeric characters followed by the nine numerical digits of the AFM.
URL: https://github.com/philaris/afmpar
BugReports: https://github.com/philaris/afmpar/issues
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2025-10-23 09:05:09 UTC; philaris
Repository: CRAN
Date/Publication: 2025-10-28 08:40:07 UTC

Check validity of AFM

Description

Given a character vector, for each of its elements, check the validity of the Greek Tax Identification Number (AFM).

Usage

afm_check(v)

Arguments

v

a character vector for whose elements validity of AFM is checked.

Value

A logical vector.

Examples

afm_check("BADAFM999")
afm_check("123456789")
afm_check("12345678")
afm_check("123456783")
afm_check(c("123456789", "111111116"))


Check validity of PA

Description

Given a character vector, for each of its elements, check the validity of the Greek Personal Number (PA). The PA allows numeric digits 0-9 and the uppercase Latin letters whose uppercase glyphs are the same in the Greek and Latin alphabet (ABEZHIKMNOPTYX).

Usage

pa_check(v)

Arguments

v

a character vector for whose elements validity of PA is checked.

Value

A logical vector.

Examples

pa_check("ABYBADAFM999")
pa_check("ABY123456789")
pa_check("ABY12345678")
pa_check("ABY1234567890")
pa_check("5XY123456783")
pa_check(c("ABY123456789", "PTT111111114"))