validaRA v0.1.1


Monthly downloads



Validate Brazilian Administrative Registers

Contains functions to validate administrative register as CPF (Cadastro de Pessoa Fisica), CNPJ (Cadastro de Pessoa Juridica), PIS (Programa de Integracao Social), CNES (Cadastro Nacional de Saude). It can check individual registers or create a 'rmarkdown' analysis of a base.


Valida RA Coverage Status

work in progress


  • Generate last digit of pis


  • Generate last digits for any RA document


This package contains functions to work with brazilian documents ids as CPF, PIS and CNPJ. It can validate them e outputing the result on different ways. Also, it can handle situations where the ids has just its prefix(first ten digits, on cpf, for example) and it is needed to generate the last one.


The package is not yet on CRAN, so to install it is needed to use devtools. Devtools can be installed as a normal R package:


After that, it is possible install validaRA from the github repository using devtools:


The package, validaRA, depends on c++ code that has to be compiled, then Rtools must be installed. It can be found here

Basic Usage

# Validanting cpf
result <- valiada_doc(c("788.346.838-38"), type = "cpf")

# Validanting pis
result <- valiada_doc(c("788.346.838-38"), type = "pis")

Functions in validaRA

Name Description
doc2integer64 Convert Brazilian documents.
gera_digito Complete Brazilian documents.
trata_cpf Correct Brazilian cpf document.
valida_doc Check Brazilian documents.
valida_doc_df Check Brazilian documents.
relatorioDOC relatorioDOC output on pdf a data frame that summarize the output of validaDOC. It is require a file where the data is located or the data itself. If neither, input and data, is giving the function stop. Also, columns and types must the same size.
tabulacaoDOC Check Brazilian documents.
No Results!

Vignettes of validaRA

No Results!

Last month downloads


Type Package
License GPL-3
Encoding UTF-8
LazyData LazyData: true
RoxygenNote 6.0.1
LinkingTo Rcpp, BH
SystemRequirements C++11
VignetteBuilder knitr
NeedsCompilation yes
Packaged 2017-10-19 18:26:42 UTC; gustavo
Repository CRAN
Date/Publication 2017-10-19 19:21:25 UTC

Include our badge in your README