我在将 flextable 表保存为图像时遇到问题,由于列宽在 png 格式时不受尊重,我已经搜索并尝试了几种方法但都不起作用,我以下面的代码为例
library(tidyverse)
library(flextable)
library(webshot)
mtcars<-merge(mtcars,mtcars,by="mpg")
cars <- flextable(mtcars) %>%
width(1,width=5) %>%
theme_box()
cars
save_as_image(cars,path="../pba7.png",webshot = "webshot")