R: Cell text style

bold {huxtable} | R Documentation

## Cell text style

### Description

Functions to get or set the cell text style property of huxtable table cells.

### Usage

    bold(ht)
    bold(ht) <- value
    set_bold(ht, row, col, value, byrow = FALSE)

    italic(ht)
    italic(ht) <- value
    set_italic(ht, row, col, value, byrow = FALSE)

### Arguments

`ht` | A huxtable.
`value` | A logical vector or matrix Set to `NA` to reset to the default.
`row` | A row specifier. See `rowspecs` for details.
`col` | An optional column specifier.
`byrow` | If `TRUE`, fill in values by row rather than by column.

### Value

For `bold`, the `bold` attribute. For `set_bold`, the `ht` object.

### See Also

Other formatting functions: `background_color`, `font_size`, `font`, `na_string`, `number_format`, `text_color`

### Examples

    ht <- huxtable(a = 1:3, b = 1:3)
    bold(ht) <-  TRUE
    bold(ht)
    print_screen(ht)

    ht <- huxtable(a = 1:3, b = 3:1)
    set_bold(ht, TRUE)
    set_bold(ht, 1:2, 1, TRUE)
    set_bold(ht, 1:2, 1:2, c(TRUE, FALSE), byrow = TRUE)
    set_bold(ht, where(ht == 1), TRUE)

[Package huxtable version 3.0.0 Index]