pad_num: Pad the beginning of numbers in a vector with zeroes so they...

View source: R/utils-pad-num.R

pad_numR Documentation

Pad the beginning of numbers in a vector with zeroes so they all have the same number of characters

Description

Pad the beginning of numbers in a vector with zeroes so they all have the same number of characters

Usage

pad_num(x, n_digits = 2, pad_char = "0")

Arguments

x

A vector of the numbers to pad

n_digits

The number of characters that the resulting strings should have

pad_char

The character to pad with. Typically zero but can be any character

Value

A vector of strings of the padded numbers


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.