huxtable (version 4.6.1)

font_size: Font size

Description

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

Usage

font_size(ht)
font_size(ht) <- value
set_font_size(ht, row, col, value, byrow = FALSE)
map_font_size(ht, row, col, fn)

Arguments

ht

A huxtable.

value

A numeric vector. This sets the font size in points.

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_size, the font_size property. For set_font_size and map_font_size, the modified huxtable.

See Also

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

Examples

Run this code
# NOT RUN {
font_size(jams) <-  14
font_size(jams)


jams2 <- set_font_size(jams,
      14)
font_size(jams2)

jams3 <- set_font_size(jams,
      2:3, 1, 14)
font_size(jams3)

jams4 <- map_font_size(jams,
      by_rows(
        14,
        12)
      )
font_size(jams4)
# }

Run the code above in your browser using DataCamp Workspace