pad2longest {ecan} | R Documentation |
Pad a string to the longest width of the strings.
pad2longest(string, side = "right", pad = " ")
string |
Strings. |
side |
Side on which padding character is added (left, right or both). |
pad |
Single padding character (default is spaces). |
Strings.
x <- c("a", "ab", "abc")
pad2longest(x, side = "right", pad = " ")