powered by
Facilitates easy alignment of strings within a character vector. Designed to help implementers of formatters for custom data types.
align(x, width = NULL, align = c("left", "right"), space = " ")
A character vector
The width that each string is padded to. If NULL, the maximum display width of the character vector is used (see get_max_extent()).
NULL
get_max_extent()
How should strings be aligned? If align = left then padding appears on the right, and vice versa.
align = left
right
What character should be used for the padding?
align(c("abc", "de"), align = "left") align(c("abc", "de"), align = "right")
Run the code above in your browser using DataLab