Learn R Programming

numbersBR (version 0.0.2)

is.valid: Validate numbers

Description

Validates the brazilian numbers when it is necessary. Not all identification numbers don't have a validation algorithm.

Usage

is.valid(x)

# S3 method for CNPJ is.valid(x)

# S3 method for CPF is.valid(x)

# S3 method for RENAVAN is.valid(x)

Arguments

x

the identification number class.

Value

A logical vector indicating whether the number is valid or not.

Examples

Run this code
# NOT RUN {
is.valid(CNPJ(c(13515463000138, 66670000101))) # TRUE, FALSE
is.valid(CPF(c(1239157673, 42752486198))) # TRUE, FALSE
is.valid(RENAVAN(c(75320797785, 42752486198))) # TRUE, FALSE
# }

Run the code above in your browser using DataLab