pad_number: Pad Numeric Numbers

Description Usage Arguments Value Author(s) Examples

View source: R/formatting.R

Description

Add zeros before start of the number

Usage

1

Arguments

x

A vector

Value

A character vector that is padded to the length of the maximum entry.

Author(s)

James Balamuta

Examples

1
2
3
4
5
6
7
8
9
# Padding applied
pad_number(8:10)

# No padding applied
pad_number(2:3)

# Pads non-negative number with 0.
# This needs to be improved slightly...
pad_number(-1:1)

jjb documentation built on Jan. 8, 2020, 5:07 p.m.