# NOT RUN {
library(magrittr)
img.file <- file.path( Sys.getenv("R_HOME"), "doc", "html", "logo.jpg" )
myft <- flextable(head( mtcars, n = 10))
myft <- myft %>%
display(
i = ~ qsec > 18, col_key = "qsec", pattern = "{{r_logo}}",
formatters = list( r_logo ~ as_image(qsec,
src = img.file, width = .20, height = .15)),
fprops = list(qsec = fp_text(color = "orange")) )
myft
# }
Run the code above in your browser using DataLab