text_color: Set the color of text in cells

Description Usage Arguments Value See Also Examples

Description

Colors can be in any format understood by R:

Usage

1
2
3
4
text_color(ht)
text_color(ht) <- value
set_text_color(ht, row, col, value )
map_text_color(ht, row, col, fn)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

value

A character vector or matrix.

Set to NA to reset to the default, which is "NA".

Value

text_color() returns the text_color property. set_text_color() returns the modified huxtable.

See Also

Other formatting functions: background_color(), bold(), font_size(), font(), na_string(), number_format()

Examples

1
2
3
4
5
6
7
8
text_color(jams) <-  "blue"
text_color(jams)

set_text_color(jams, "red")
set_text_color(jams,
      2:3, 1, "red")
map_text_color(jams,
      by_rows("red", "blue"))

huxtable documentation built on Feb. 15, 2021, 1:07 a.m.