lt_width: Set column and table widths

View source: R/tab.R

lt_widthR Documentation

Set column and table widths

Description

Set column and table widths

Usage

lt_width(x, ...)

Arguments

x

An lt() object.

...

Named arguments of the form col_name = "width" set the widths of individual columns. A single unnamed scalar sets the width of the whole table. Widths can be any CSS value (e.g., "100px", "20%", "8em"). The column widths can instead be given as a single list(names, widths) of two parallel vectors.

Value

x with the widths recorded.

Examples

lt(head(mtcars)) |> lt_width(mpg = "100px", cyl = "50px")
# set the whole-table width, optionally with column widths
lt(head(mtcars)) |> lt_width("80%", mpg = "100px")
# a single list(names, widths) of two parallel vectors
lt(head(mtcars)) |> lt_width(list(c("mpg", "cyl"), c("100px", "50px")))

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