ft <- flextable(head(mtcars))
ft <- color(ft, color = "orange", part = "header")
ft <- color(ft,
color = "red",
i = ~ qsec < 18 & vs < 1
)
ft
if (require("scales")) {
scale <- scales::col_numeric(domain = c(-1, 1), palette = "RdBu")
x <- as.data.frame(cor(iris[-5]))
x <- cbind(
data.frame(
colname = colnames(x),
stringsAsFactors = FALSE
),
x
)
}
Run the code above in your browser using DataLab