【发布时间】:2022-08-06 03:43:43
【问题描述】:
我想将图像插入到使用 knit 按钮时完美工作的弹性表中。但是,我需要通过调用rmarkdown::render(input = \"path_to_file/file.Rmd\") 来执行代码。
这会生成以下错误消息:
save_kable(x = x, file = temp_png, ...) 中的错误:
缺少参数“x”,没有默认值这是 YAML:
--- output: officedown::rdocx_document ---这是一个可重现的例子:
```{r} library(officer) library(flextable) library(officedown) img.file <- file.path( R.home(\"doc\"), \"html\", \"logo.jpg\" ) myft <- flextable( head(iris)) myft <- compose(myft, i = 1:3, j = 1, value = as_paragraph(as_image(src = img.file, width = .20, height = .15))) ft <- autofit(myft) ft ```
-
我无法重现,它会生成预期的文档。你可以添加你的会话信息吗?我不明白为什么错误中提到了
save_kable...
标签: r r-markdown render flextable officedown