Hi, I am trying to create a function in R markdown for conditional formatting while using flextable package.
I am trying to color format rows based on the condition which compares two columns.
library(flextable)
library(dplyr)
cndnl_form <- function(data,mv1,ov1)
{
ft <- flextable({{data}})
ft <- color(ft, i = ~ (mv1- ov1/ abs(mv1) > 0.25),
j = ov1,
color="blue")
}
cndnl_form(df,"ft$3","ft$10")
but i am getting an error
Error during wrapup: object 'mv1' not found
Any idea, what should i change?