powered by
Functions to get or set the text color property of huxtable cells.
text_color(ht) text_color(ht) <- value set_text_color(ht, row, col, value, byrow = FALSE) map_text_color(ht, row, col, fn)
A huxtable.
A character vector or matrix of valid R colors.
Set to NA to reset to the default, which is NA.
NA
A row specifier. See rowspecs for details.
An optional column specifier.
A mapping function. See mapping-functions for details.
Deprecated. Use by_cols() instead.
by_cols()
For text_color, the text_color property. For set_text_color and map_text_color, the modified huxtable.
text_color
set_text_color
map_text_color
Colors can be in any format understood by R, e.g. "red", "#FF0000" or rgb(1, 0, 0).
"red"
"#FF0000"
rgb(1, 0, 0)
Other formatting functions: background_color, bold, font_size, font, na_string, number_format
background_color
bold
font_size
font
na_string
number_format
# NOT RUN { text_color(jams) <- "blue" text_color(jams) set_text_color(jams, "blue") set_text_color(jams, 2:3, 1, "blue") map_text_color(jams, by_rows("blue", "red")) # }
Run the code above in your browser using DataLab