Make cell text bold or italic
Usage
bold(ht)
bold(ht) <- value
set_bold(ht, row, col, value = TRUE)
map_bold(ht, row, col, fn)
italic(ht)
italic(ht) <- value
set_italic(ht, row, col, value = TRUE)
map_italic(ht, row, col, fn)
Arguments
- ht
A huxtable.
- value
A logical vector or matrix. Set to
NA
to reset to the default, which isFALSE
.- row
A row specifier. See rowspecs for details.
- col
An optional column specifier.
- fn
A mapping function. See mapping-functions for details.
See also
Other formatting functions:
background_color()
,
font()
,
font_size()
,
na_string()
,
number_format()
,
text_color()
Examples
bold(jams) <- TRUE
bold(jams)
#> Type Price
#> 1 TRUE TRUE
#> 1.1 TRUE TRUE
#> 2 TRUE TRUE
#> 3 TRUE TRUE
set_bold(jams, FALSE)
#> Type Price
#> Strawberry 1.90
#> Raspberry 2.10
#> Plum 1.80
#>
#> Column names: Type, Price
set_bold(
jams,
2:3, 1, FALSE
)
#> Type Price
#> Strawberry 1.90
#> Raspberry 2.10
#> Plum 1.80
#>
#> Column names: Type, Price
map_bold(
jams,
by_rows(FALSE, TRUE)
)
#> Type Price
#> Strawberry 1.90
#> Raspberry 2.10
#> Plum 1.80
#>
#> Column names: Type, Price