gpt4 book ai didi

r - 如何解决 beamer_presentation 中的错误,文件不存在?

转载 作者:行者123 更新时间:2023-12-05 00:34:13 25 4
gpt4 key购买 nike

编织到 beamer_presentation 时我收到此错误消息,有人知道如何阅读并解决此问题吗?

代码:

---
title: "Untitled"
author: "Author"
date: "6 April 2018"
output: beamer_presentation
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## R Markdown

Something

错误信息:

processing file: TEST.Rmd
|...................... | 33%
ordinary text without R code

|........................................... | 67%
label: setup (with options)
List of 1
$ include: logi FALSE

|.................................................................| 100%
ordinary text without R code


output file: TEST.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS TEST.utf8.md --to beamer --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output TEST.tex --highlight-style tango --latex-engine pdflatex --self-contained

Output created: TEST.pdf
Error in tools::file_path_as_absolute(output_file) :
file 'TEST.pdf' does not exist
Calls: <Anonymous> -> <Anonymous>
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "TEST.tex"' had status 1
Execution halted

版本信息:

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Switzerland.1252 LC_CTYPE=German_Switzerland.1252
[3] LC_MONETARY=German_Switzerland.1252 LC_NUMERIC=C
[5] LC_TIME=German_Switzerland.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_0.12.16 tufte_0.3 digest_0.6.15 withr_2.1.2 rprojroot_1.3-2
[6] R6_2.2.2 backports_1.1.2 git2r_0.21.0 magrittr_1.5 evaluate_0.10.1
[11] httr_1.3.1 stringi_1.1.7 curl_3.2 rmarkdown_1.9.8 devtools_1.13.5
[16] tools_3.4.4 stringr_1.3.0 rsconnect_0.8.8 yaml_2.1.18 compiler_3.4.4
[21] memoise_1.1.0 htmltools_0.3.6 knitr_1.20

注意: 几个月前,这没有问题。

最佳答案

根据GitHub issue rstudio/rmarkdown#1285 ,有两种解决方案。

第一次降级 rmarkdown

devtools::install_version("rmarkdown", version = "1.8", 
repos = "http://cran.us.r-project.org")

第二次安装/升级 tinytex

install.packages('rmarkdown')  # installs v 1.9 at the moment
devtools::install_github('yihui/tinytex')

我选择了第二个选项,对我来说效果很好。

关于r - 如何解决 beamer_presentation 中的错误,文件不存在?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49687027/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com