0

I want show current value color in blue, if last value less than actual. Or if less than last value, show font color ir Red.

For example, in the last row the social security value is greater than last value, i want show automatically font value in blue color. But, if less, automatically red color. Is that possible using flextable?




tail(cbind(despesa_date, 
           despesa_df),
     13) %>%
  flextable::flextable() %>%
  flextable::align(align="c",
                   part="all") %>%
  flextable::width(j = 1, 
                   width = 0.9) %>%
  flextable::bg(i=c(1,3,5,7,9,11,13),
                bg="#916da1") %>%
  flextable::bg(i=c(2,4,6,8,10,12),
                bg="#d49deb") %>%
  flextable::bg(part = "header",
                bg = "purple") %>%
  flextable::color(part="header",
                   color = "white") %>%
  flextable::bold(part="all")



enter image description here

  • Do not post your data as an image. See https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for a better way to create a reproducible example. – M Aurélio May 26 '23 at 18:59

0 Answers0