id.15to18: Update Chinese ID Card Number to Eighteen Digits

Description Usage Arguments Value Note Author(s) Examples

Description

The digits of the old version (before 2000 year) of 'Chinese ID Card Number' is 15, this package aims to update to the current version of 18 digits.

Usage

1
id.15to18(id.15)

Arguments

id.15

vector of numeric or character, the old version of Chinese ID Card Number

Value

id.18

character, the new version of Chinese ID Card Number

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
2
id.15to18(id.15="441900890101221")
id.15to18(id.15=rep("441900890101221",2))

Example output

[1] "441900198901012219"
[1] "441900198901012216" "441900198901012216"
Warning message:
In if (nchar(id.15.c) != 15) { :
  the condition has length > 1 and only the first element will be used

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

Related to id.15to18 in IDCard...