is.id: Checking the Chinses ID Card Number

Description Usage Arguments Value Note Author(s) Examples

Description

Checking the ID card number including length, area code, birth date, and last 3 number.

Usage

1
is.id(id,code)

Arguments

id

vector of Chinese ID Card Number

code

please set as the sample

Value

id

vector of Chinese ID Card Number, the same as the input

length

logic, whether the length of the 'id' is right or not, if 'FALSE', the following will be 'FALSE' either

area

logic, whether the area code of 'id' is right or not, if 'FALSE', the following will be 'FALSE' either

birth

logic, whether the birth date of 'id' is right or not, if 'FALSE', the following will be 'FALSE' either

last3

logic, whether the birth date of 'id' is right or not, if 'FALSE', the following will be 'FALSE' either

Note

Please feel free to contact us, if you have any advice and find any bug!

Reference:

1. State Standard of the People's Republic of China: GB11643-1999 2. International Organization for Standardization: ISO7064:1983.MOD11-2

Update:

version 0.2.0: the input of id.15to18() can be a single element and a vector.

version 0.3.0: is.id() is added.

More advanced performance is coming!

Author(s)

Zhicheng Du<dgdzc@hotmail.com>, Yuantao Hao<haoyt@mail.sysu.edu.cn>

Examples

1
with(code,is.id(c("123456789123456","12345678912345X"),code))

Example output

               id length  area birth last3
1 123456789123456   TRUE FALSE FALSE FALSE
2 12345678912345X   TRUE FALSE FALSE FALSE

IDCard documentation built on May 2, 2019, 1:18 p.m.

Related to is.id in IDCard...