KableExtra: How can I highlight cells that have changed? (latex)

19 views Asked by At

I have a data frame with around 8 columns and 35-40 rows. Does anyone know if I can highlight cells that have changed from one column to the next?

In the example below, I would like the b in the third row to be highlighted (i.e I want to fill the background with some color).

I figure row_spec or col_spec should be used, but I'm not sure where to begin.

library(kableExtra)

df <- data.frame(date_one = c("a","b","c"),
                 date_two = c("a","b","b"))


df |> 
  kable(format = "latex")


0

There are 0 answers