lt_html: Render Column Cells as Raw HTML

View source: R/tab.R

lt_htmlR Documentation

Render Column Cells as Raw HTML

Description

Mark whole columns so their body cells are emitted as raw HTML instead of being escaped. By default every cell is HTML-escaped (so <, >, and & render as literal text); use this to embed links, emphasis, or other markup in a column's cells.

Usage

lt_html(x, columns)

Arguments

x

An lt() object.

columns

Column names (character or one-sided formula) whose cells are raw HTML. If missing, all columns are treated as raw HTML.

Details

To emit raw HTML in other regions (title, column labels, footnotes, ...), wrap the text in I() in the corresponding ⁠lt_*()⁠ function instead.

Value

x with the raw-HTML columns recorded.

Examples

d = data.frame(
  name = c("<a href='#a'>A</a>", "<a href='#b'>B</a>"), n = 1:2
)
lt(d) |> lt_html(~ name)

lt documentation built on July 10, 2026, 1:09 a.m.