Learn R Programming

IDCard (version 0.3.0)

is.id: Checking the Chinses ID Card Number

Description

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

Usage

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

Examples

Run this code
# NOT RUN {
with(code,is.id(c("123456789123456","12345678912345X"),code))
# }

Run the code above in your browser using DataLab