【发布时间】:2021-10-10 21:39:26
【问题描述】:
我的文件树如下所示:
--预测
----报告
------forecast.rmd
----情节
--------预测
--------2021-08-05
----------apps-approved-Credit Card.png
我在开头设置了选项
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
以及导入图片的代码块:
knitr::include_graphics("forecast\\plots\\forecasts\\2021-08-05\\apps-approved-Credit Card.png"))
当我执行上面的代码块时,我得到了预期的结果:
[1] "forecast\\plots\\forecasts-training\\2021-08-05\\apps-approved-Credit Card.png"
attr(,"class")
[1] "knit_image_paths" "knit_asis"
但是,在编织文档时,出现以下错误
[警告] 无法获取资源 'forecast\plots\forecasts-training\2021-08-05\apps-approved-Credit%20Card.png':PandocResourceNotFound "forecast\plots\forecasts-training\2021-08- 05\apps-approved-Credit Card.png"
【问题讨论】: