justify: Justify a character vector

View source: R/utils_justify.R

justifyR Documentation

Justify a character vector

Description

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

Usage

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-ajtools documentation built on April 4, 2022, 7:24 a.m.