Make cell text bold or italic
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)
A huxtable.
A row specifier. See rowspecs for details.
An optional column specifier.
A mapping function. See mapping-functions for details.
A logical vector or matrix.
Set to NA
to reset to the default, which is FALSE
.
bold()
returns the bold
property.
set_bold()
returns the modified huxtable.
Other formatting functions:
background_color()
,
font()
,
font_size()
,
na_string()
,
number_format()
,
text_color()
bold(jams) <- TRUE
bold(jams)
#> Type Price Sugar
#> 1 TRUE TRUE TRUE
#> 1.1 TRUE TRUE TRUE
#> 2 TRUE TRUE TRUE
#> 3 TRUE TRUE TRUE
set_bold(jams, FALSE)
#> Type Price Sugar content
#> Strawberry 1.90 40.00%
#> Raspberry 2.10 35.00%
#> Plum 1.80 50.00%
#>
#> Column names: Type, Price, Sugar
set_bold(jams,
2:3, 1, FALSE)
#> Type Price Sugar content
#> Strawberry 1.90 40.00%
#> Raspberry 2.10 35.00%
#> Plum 1.80 50.00%
#>
#> Column names: Type, Price, Sugar
map_bold(jams,
by_rows(FALSE, TRUE))
#> Type Price Sugar content
#> Strawberry 1.90 40.00%
#> Raspberry 2.10 35.00%
#> Plum 1.80 50.00%
#>
#> Column names: Type, Price, Sugar