Can anyone suggest why I am having a problem with "greater than" in {flextable}? I assume I'm missing something obvious but what?
suppressMessages(library(data.table))
suppressMessages(library(tidyverse))
suppressMessages(library(flextable))
DT <- data.table(aa = LETTERS[1:7], bb = c("12", "4", "<5", "<2", "<0.5", "15", "20"),
cutoff = c(6, 4, 5, 7, 11, 7, 20 ))
DT1 <- DT[- grep("<", bb),]
DT1[, bb := as.numeric(bb)]
# Equality work
tb1 <- flextable(DT1, col_keys = c("aa", "bb"))
tb1 %>% bold(~ bb == cutoff, 2)
# "Greater than" does not work
tb2 <- flextable(DT1, col_keys = c("aa", "bb"))
tb2 %>% bold(~ bb < cutoff, 2)