format: Format numbers

Description Usage Arguments Value Examples

Description

Formats the brazilian numbers according to their specific format.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'CNPJ'
format(x, format = c("strict", "stripped"), ...)

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

## S3 method for class '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

1
2
3
4
5
6
7
8
x <- CNPJ(66670000100)
format(x)
format(x, "stripped")
x <- CPF(1239157673)
format(x)
format(x, "stripped")
x <- RENAVAN("68194359406")
format(x)

wilsonfreitas/numbersBR documentation built on May 4, 2019, 6:28 a.m.