Debian Codegraph @

man/align.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/extent.R
3 \name{align}
4 \alias{align}
5 \title{Alignment helper}
6 \usage{
7 align(x, width = NULL, align = c("left", "right"), space = " ")
8 }
9 \arguments{
10 \item{x}{A character vector}
11
12 \item{width}{The width that each string is padded to. If \code{NULL}, the maximum
13 display width of the character vector is used (see \code{\link[=get_max_extent]{get_max_extent()}}).}
14
15 \item{align}{How should strings be aligned? If \code{align = left} then padding
16 appears on the \code{right}, and vice versa.}
17
18 \item{space}{What character should be used for the padding?}
19 }
20 \description{
21 Facilitates easy alignment of strings within a character vector. Designed to
22 help implementers of formatters for custom data types.
23 }
24 \examples{
25 align(c("abc", "de"), align = "left")
26 align(c("abc", "de"), align = "right")
27 }