so i have many flextable objects in r script. now the objective is to save those objects in different sheets of excel.
i want to add one parameter in function like list1,list2... and at the end want to add the flex table object into that list.
library(flextable)
library(dplyr)
fun1 <- function(lst1,data, mv1, ov1) {
ft <- flextable(data)
row <- reformulate(paste(mv1, "> 20"))
col <- reformulate(ov1)
color(ft, i = row, j = col, color = "blue")
ft
lst1 <- lst1[length(lst1)+1]
}
ft <- fun1(head(mtcars), "mpg", "gear")