Ricetl tutorial"

  collapse = TRUE,
  comment = "#>"



Ricetl implements a concise graphical user interface(GUI), You can complete all contains information extraction and ID card data processing (including missing value filling) for People's Republic of China ID card through the function Ricetl(), Just prepare a data file with a column of ID numbers (a file suffix name is one of .csv or .xlsx).At the same time, we provide 4 separate functions to extract ID number information, and a public data set about the corresponding rules of the first six digits and addresses of the ID number.More content can be seen in GitHub

The Coding Rules and Verification Code Implementation of China ID card

1.Code rules for Chinese identity card number

2.Check code algorithm

Multiplied by the corresponding weighting factor and sum, divide the number by 11 to get the remainder, and check the check code by the remainder through the check code control table.

The following table lists the weighting factors corresponding to the ID number and the final check code ratio table.

a <- c('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17')
b <- c('7','9','10','5','8','4','2','2','6','3','7','9','10','5','8','4','2')
dat <- data.frame(a,b)
names(dat) <- c('位置序号','加权因子')
dt <- data.frame(t(dat))
c1 <- c(0,1,2,3,4,5,6,7,8,9,10)
d <- c('1','0','X','9','8','7','6','5','4','3','2')
dat1 <- data.frame(c1,d)
names(dat1) <- c('余数','校验码')
dt2 <-data.frame(t(dat1))


Ricetl Functions and Open Data Sets

It mainly introduces 5 functions and a public set of data in the Ricetl package.

Library the Ricetl package, input Ricet() in the R terminal you can flip the ID number in batch, and extract the identity data.It provides a simple GUI interface.


id2XX() function group, which can be used to extract the full information in the ID card.

x <- c('654003198111200241','341881197709275718','340503199401248097','469030199406204103','51110019')




#Verifying the true and false

The relationship between the first six bits of a common data set to match the ID number and the place names in China


For more, see GitHub


Jing Xu https://dataxujing.github.io/

Try the Ricetl package in your browser

Any scripts or data that you put into this service are public.

Ricetl documentation built on June 10, 2019, 1:03 a.m.