cell_note: Set notes referenced from cells

View source: R/properties-cell.R

cell_noteR Documentation

Set notes referenced from cells

Description

cell_note is a cell property containing plain-text notes. When a huxtable is rendered, cells with notes receive reference marks and the distinct notes are printed beneath any unreferenced table_notes(). Identical note text in multiple cells receives the same mark.

Usage

cell_note(ht)

cell_note(ht) <- value

set_cell_note(ht, row, col, value)

map_cell_note(ht, row, col, fn)

Arguments

ht

A huxtable.

value

A character vector or matrix. Use NA or "" for no note.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

Details

Reference marks are assigned when the huxtable is rendered, in row-major order over visible cells. Subsetting a huxtable therefore does not modify its notes. In merged ranges, only a note on the top-left visible cell is used.

HTML, LaTeX, Typst and RTF use superscript marks. Word, Excel, Markdown and screen output use bracketed marks.

Use note_symbol() to choose numeric, Roman, alphabetic or custom marks.

Value

cell_note() returns a character matrix. The replacement function, set_cell_note() and map_cell_note() return the modified huxtable.

Examples

ht <- hux(a = 1:2, b = 3:4)
ht <- set_cell_note(ht, 1:2, 1, "Measured value")
cell_note(ht)


huxtable documentation built on Sept. 21, 2026, 1:07 a.m.