File: align.Rd

package info (click to toggle)
r-cran-pillar 1.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,840 kB
  • sloc: sh: 13; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 868 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extent.R
\name{align}
\alias{align}
\title{Alignment helper}
\usage{
align(x, width = NULL, align = c("left", "right"), space = " ")
}
\arguments{
\item{x}{A character vector}

\item{width}{The width that each string is padded to. If \code{NULL}, the maximum
display width of the character vector is used (see \code{\link[=get_max_extent]{get_max_extent()}}).}

\item{align}{How should strings be aligned? If \code{align = left} then padding
appears on the \code{right}, and vice versa.}

\item{space}{What character should be used for the padding?}
}
\description{
Facilitates easy alignment of strings within a character vector. Designed to
help implementers of formatters for custom data types.
}
\examples{
align(c("abc", "de"), align = "left")
align(c("abc", "de"), align = "right")
}