昨天,我能够将我的针织桌子保存为论文中的图形图像。然而,晚上的某个时候,在下载其他软件包时出现了问题,现在我无法执行代码并收到此错误:
"Could not load c:%5CUsers%5Clehi%5CAppData%5CLocal%5CTemp%5C1%5CRtmpKkDUDx%5Ctable_1A4e045152702b.html
Error in webshot::webshot(file_temp_html, file, ...) :
webshot.js returned failure value: 1"
5.stop("webshot.js returned failure value: ", res)
4.webshot::webshot(file_temp_html, file, ...)
3.save_kable_html(x, file, bs_theme, self_contained, extra_dependencies,
density, ...)
2.save_kable(., file = "table_1A.png")
1.dt %>% kbl(caption = "Table 1: Pregnancy Data") %>% kable_classic(full_width = F,
html_font = "Cambria") %>% save_kable(file = "table_1A.png")
Run Code Online (Sandbox Code Playgroud)
这是可重现的代码:
library(knitr)
library(kableExtra)
library(tidyverse)
library(readxl)
dt <- mtcars[1:5, 1:6]
dt %>%
kbl(caption = "Table 1: Pregnancy Data") %>%
kable_classic(full_width = F, html_font = "Cambria") %>% …Run Code Online (Sandbox Code Playgroud)