equal_nchar: elements of uniformal 'nchar' length

Description Usage Arguments Value Examples

View source: R/equal_nchar.R

Description

make nchar have the same value for all elements of x

Usage

1
equal_nchar(x, n = NULL, fill = " ", right = FALSE)

Arguments

x

vector to fix

n

uniformal nchar length for elements of x

fill

character to fill the void

right

fill to the right?

Value

character string

Examples

1
2
3
4
equal_nchar(x = c("A", "ABC"))
equal_nchar(x = c("A", "ABC"), 2, fill = "_")
equal_nchar(x = c("A", "ABC"), fill = ".", right = FALSE)
equal_nchar(8:12, fill = "0")

renlund/dm documentation built on Jan. 18, 2022, 9:50 a.m.