gt
gt copied to clipboard
Add option to format coloring outside of just columns
Great Package!
In toying with some data I'll present in a few months, I noticed the "data_color" function within the gt package doesn't support coloring by rows or coloring specific cells alone. Are there any plans to support that functionality in the future?
This can be supported, and it should. The rows
argument could be introduced to limit the scope of coloring to specified rows.
Side note: there is also the somewhat related issue of whether to add functionality to use data in cells to color adjacent cells.
@rich-iannone, I was just looking for the functionality you described in the side-note, i.e. to color an adjacent column and then hide the column with the raw data. It would be great if that could be implemented, maybe with an optional values_from
argument?
In case anyone else is looking for a workaround in the meantime: formatting can be moved between columns by changing the colname
in the _styles
tibble, for instance like this
tab$`_styles`$colname[tab$`_styles`$colname == "impl_bias"] <- "Implicit bias"