library("highlightr")
library("tibble")
text <- c("This is a good test with some bad words", "bad guy vs good guy")
dict <- tibble(
  feature = c("good", "bad"),
  bg_colour = c("#2ca25f", "#de2d26")
)
highlight(text, dict, output = "tex")


JBGruber/highlightr documentation built on Oct. 11, 2022, 2:53 a.m.