【问题标题】:Error when knitting default RMarkdown file in RStudio在 RStudio 中编织默认 RMarkdown 文件时出错
【发布时间】:2019-03-11 08:05:16
【问题描述】:

我使用的是 RStudio 版本 1.1.456,它运行的是 R 版本 3.5.1。我在 64 位 Windows 7 Enterprise 上运行。

我是使用 R Markdown 的新手,所以当我在 RStudio 中打开一个新的 R Markdown 文件时,我认为在我自己尝试之前运行默认代码会很好。 (注意:这是打开新 Rmd 文件时自动填充的代码)。

---
title: "test"
output: html_document
---

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

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r cars}
summary(cars)
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.

当我尝试编织此默认代码时,我收到以下错误:

pandoc.exe: Could not fetch \\VAULT24\HOME24$\rosnerta\My Documents\R\win-library\3.5\rmarkdown\rmd\h\jquery-1.11.3\jquery.min.js
FailedConnectionException2 "VAULT24" 80 False connect: failed (Connection timed out (WSAETIMEDOUT))
Error: pandoc document conversion failed with error 67
Execution halted

当我使用渲染功能和按下编织按钮时都会出现此错误。

我搜索了各种错误消息,但没有发现任何有用/相关的信息。我已经安装了 knitr、rmarkdown 和 markdown 包。我还检查了错误消息中提供的文件路径确实存在,确实存在。

如果有人能帮助我弄清楚为什么会发生这种情况,我将不胜感激。我真的很想养成在我的工作中使用 R Markdown 的习惯,但我怀疑即使默认代码也不会编织。

不确定这是否有帮助,但这是我的会话信息:

R version 3.5.1 (2018-07-02)
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=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
[1] rmarkdown_1.10

loaded via a namespace (and not attached):
 [1] compiler_3.5.1  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2 htmltools_0.3.6 tools_3.5.1     yaml_2.2.0      Rcpp_0.12.18    stringi_1.1.7   knitr_1.20      stringr_1.3.1   digest_0.6.16   evaluate_0.11  

提前致谢。

【问题讨论】:

    标签: rstudio markdown r-markdown


    【解决方案1】:

    自 2014 年以来,关于 pandoc 错误 67 的讨论很多。您可以在以下链接中找到其中的一些内容:(onetwothreefour)。 我听说的唯一解决方法是禁用自包含 (self_contained: no)

    希望对你有所帮助。

    title: "test"
    output: 
      html_document:
        self_contained: no
    

    【讨论】:

    • 谢谢!前几天我 100% 尝试过,现在它似乎正在工作......不太确定为什么它以前没有工作,但我很高兴我又试了一次。感谢您的帮助!
    • github_document有类似的解决方案吗?
    【解决方案2】:

    删除 R 尝试访问的文件夹

    首先,删除“R”文件夹:

    \VAULT24\HOME24$\rosnerta\My Documents\R\win-library\3.5\rmarkdown\rmd\h\jquery-1.11.3\jquery.min.js

    它看起来像一个网络驱动器,R 无法访问。我遇到了类似的问题,在该位置删除 R 文件夹解决了我的问题。

    然后,将 R 安装到桌面上的文件夹中,或其他您拥有完全权限的位置。 然后应该可以编织独立的 HTML 文档。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-26
      • 1970-01-01
      • 1970-01-01
      • 2019-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-07
      相关资源
      最近更新 更多