| cellspec_lgl {eHDPrep} | R Documentation |
Kable logical data highlighting
Description
Adds colour highlighting to cell values if they are encoded as logical
values. Output should then be passed to knitr's kable
function.
Usage
cellspec_lgl(.data, rg = FALSE)
Arguments
.data |
Table to be highlighted. |
rg |
Should red and green be used for |
Details
This is useful for identifying the encoding used in a value (e.g. the
difference between the string "TRUE" and truth value of logic TRUE).
This highlighting can also be useful when visually assessing cell values in
a table. The colour naming format (HTML or LaTeX) is automatically detected.
There are four cell types considered:
non-logical cells are coloured black)
TRUEcells are coloured red (default) or green ifrgisTRUEFALSEcells are coloured cyan (default) or red ifrgisTRUENAcells are coloured gray
Note: When passed to kable(), the escape parameter should be
FALSE for colours to be rendered correctly.
Value
Table with cell colours specified.