Learn R Programming

numbersBR (version 0.0.2)

format.CNPJ: Format numbers

Description

Formats the brazilian numbers according to their specific format.

Usage

# S3 method for CNPJ
format(x, format = c("strict", "stripped"), ...)

# S3 method for CPF format(x, format = c("strict", "stripped"), ...)

# S3 method for RENAVAN format(x, ...)

Arguments

x

the identification number class.

format

can be strict which is the default format with all dots, dashes and hyphens or stripped which returns only the numbers.

...

arguments to be passed to or from other methods.

Value

A character vector with the formatted number.

Examples

Run this code
# NOT RUN {
x <- CNPJ(66670000100)
format(x)
format(x, "stripped")
x <- CPF(1239157673)
format(x)
format(x, "stripped")
x <- RENAVAN("68194359406")
format(x)
# }

Run the code above in your browser using DataLab