Facilitates easy alignment of strings within a character vector. Designed to help implementers of formatters for custom data types.
Usage
align(x, width = NULL, align = c("left", "right"), space = " ")Arguments
- x
A character vector
- width
The width that each string is padded to. If
NULL, the maximum display width of the character vector is used (seeget_max_extent()).- align
How should strings be aligned? If
align = leftthen padding appears on theright, and vice versa.- space
What character should be used for the padding?