pad_number {jjb}R Documentation

Pad Numeric Numbers

Description

Add zeros before start of the number

Usage

pad_number(x)

Arguments

x

A vector

Value

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

Author(s)

James Balamuta

Examples

# 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)

[Package jjb version 0.1.1 Index]