Hello, say I have a small dataset as follows:
library(gt)
library(tidyverse)
id <- c(1,2,3,4,5)
res1 <- c("true", "true", "false", "true", "false")
res2 <- c("false", NA, NA, "true", "true")
df <- data.frame(id, res1, res2)
df %>%
gt()
For columns res1 and res2, let's say if value content are trues, I'll need to highlight that cell with red background color, if falses, highlight with green color, for other cases, keep their colors as original.
Is it possible to achieve that using gt package?