当我尝试将 Rmarkdown 文档编译为 pdf 时,出现此错误:
Error: Functions that produce HTML output found in document targeting latex output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:
always_allow_html: yes
Note however that the HTML output will not be visible in non-HTML formats.
有谁知道这是什么意思?
最佳答案
您是否尝试过以下方法? (来自:https://bookdown.org/yihui/bookdown/html-widgets.html)
install.packages("webshot")
webshot::install_phantomjs()
它对我有用。另见:https://github.com/rstudio/bookdown/issues/440
关于R Markdown 编译错误:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42543206/