lt_align: Set column alignment

View source: R/tab.R

lt_alignR Documentation

Set column alignment

Description

Override the auto-detected alignment for specific columns. By default, numeric columns are right-aligned and character columns are left-aligned.

Usage

lt_align(x, columns, align = c("left", "center", "right"))

Arguments

x

An lt() object.

columns

Columns to select: a character vector of column names, integer positions, or a one-sided formula. A formula whose right-hand side references the pronoun . (the character vector of column names) is evaluated as a predicate, e.g. ~ endsWith(., "_time") selects all columns whose names end with ⁠_time⁠; otherwise the bare names on the right-hand side are used, e.g. ~ x + y.

align

One of "left", "center", or "right".

Value

x with the alignment recorded.

Examples

lt(head(mtcars)) |> lt_align(~ cyl + gear, "center")

lt documentation built on Oct. 17, 2026, 9:06 a.m.