Description Usage Arguments Note
These functions change the font color of a cell of a kable obejct.
.g
makes positive values green, negative values red, and zero values black
.r
does the reverse, making positive values red
1 2 3 | red_green_text.g(x, data = NULL)
red_green_text.r(x, data = NULL)
|
x |
A numeric column of a data.frame or data.table |
For best usage, apply the color transformation with mutate() and then pass the mutated object through kable() with escape = F and format = 'html'. If kableExtra::kable_styling() is used then use protect_latex = F.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.