justify: Justify a character vector

Description Usage Arguments

View source: R/utils_justify.R

Description

Justify a character vector of numbers using a character to pad strings on the left and right sides

Usage

1
2
3
4
5
6
justify(
  input_vec,
  justify_mode = c("decimal", "left", "center", "right"),
  decimal = ".",
  justify_char = " "
)

Arguments

input_vec

Input vector. Coerced to character.

justify_mode

Mode to use for justifying a vector of values. Can be "l" (left), "c" (center), "r" (right), or "d" (decimal).

decimal

Character to justify around when justify_mode = "decimal"

justify_char

Character (or string) used to pad strings.


adamleejohnson/r-tools documentation built on Jan. 7, 2022, 5:35 p.m.