num_pad: Pads text on the left or right so that the width is the same...

View source: R/formatting.R

num_padR Documentation

Pads text on the left or right so that the width is the same for each element of the vector

Description

Pads text on the left or right so that the width is the same for each element of the vector

Usage

num_pad(x, pad_left = TRUE, padding_character = " ", NA_value = "")

Arguments

x

vector of text

pad_left

if TRUE (default), pads on the left, otherwise pads on the right

padding_character

character to use for padding, default is ⁠ ⁠ (figure space)

NA_value

value to replace NA

Value

character vector

Examples

num_pad(c("a", "bb"))

apa7 documentation built on May 26, 2026, 5:07 p.m.