pretty_numbers: Converts numerical codes to universal format specified by...

View source: R/pretty_numbers.R

pretty_numbersR Documentation

Converts numerical codes to universal format specified by length.

Description

Creates numerical strings with given lengths by removing additional characters from the back and adding leading zeros if necessary.

Usage

pretty_numbers(v, length_final = 5, remove_from_back = 4)

Arguments

v

vector, integer or sting vector with numerical values.

length_final

numeric, the length of the final string. Defaults to 5 for zip code conversions.

remove_from_back

numeric, the number of digits to remove from the back of the string. If NULL, then removes characters from back more than specified in length_final. Defaults to 4 for zip code conversions by removing the add-on codes.

Value

vector, with characters formatted accordingly.


parseRPDR documentation built on March 31, 2023, 11:36 p.m.