huxtable (version 4.5.0)

font: Font

Description

Functions to get or set the font property of huxtable cells.

Usage

font(ht)
font(ht) <- value
set_font(ht, row, col, value, byrow = FALSE)
map_font(ht, row, col, fn)

Arguments

ht

A huxtable.

value

A character vector of font names. NB that LaTeX and HTML use different font names.

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

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

byrow

Deprecated. Use by_cols() instead.

Value

For font, the font property. For set_font and map_font, the modified huxtable.

See Also

Other formatting functions: background_color, bold, font_size, na_string, number_format, text_color

Examples

Run this code
# NOT RUN {
font(jams) <-  "times"
font(jams)


jams2 <- set_font(jams,
      "times")
font(jams2)

jams3 <- set_font(jams,
      2:3, 1, "times")
font(jams3)

jams4 <- map_font(jams,
      by_rows(
        "times",
        "arial")
      )
font(jams4)
# }

Run the code above in your browser using DataLab