在RStudio中编织默认RMarkdown文件时出错 [英] Error when knitting default RMarkdown file in RStudio

查看:627
本文介绍了在RStudio中编织默认RMarkdown文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RStudio版本1.1.456,该版本正在运行R版本3.5.1.我正在64位Windows 7企业版上运行.

I am using RStudio version 1.1.456, which is running R version 3.5.1. I am running on Windows 7 Enterprise, 64-bit.

我对使用R Markdown并不陌生,因此,当我在RStudio中打开新的R Markdown文件时,我认为最好在自己尝试任何操作之前运行默认代码. (注意:这是打开新的Rmd文件时自动填充的代码).

I'm new to using R Markdown, and so when I opened a new R Markdown file in RStudio, I thought it would be good to run the default code before I tried anything myself. (Note: this is the code that is automatically populated when opening a new Rmd file).

---
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.

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

When I tried to knit this default code, I get the following error:

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

当我使用渲染功能和按下编织"按钮时,都会发生此错误.

This error occurs both when I use the render function, and when I press the knit button.

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

I've searched the various error messages and have not found anything helpful/relevant. I have installed the knitr, rmarkdown, and markdown packages. I have also checked that file path provided in the error message does exist, and indeed, it does.

如果有人可以帮助我弄清楚为什么会这样,我将非常感激.我真的很想养成在我的工作中使用R Markdown的习惯,但是我怀疑即使默认代码也无法编写,这是否有可能.

If anyone could help me figure out why this is happening, I would be very appreciative. I would really like to get in the habit of using R Markdown for my work, but I doubt that will be possible if even the default code won't knit.

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

Not sure if this is helpful, but here is my session info:

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  

谢谢.

推荐答案

自2014年以来,已经有很多关于pandoc错误67的讨论.您可以在以下链接中找到其中的一些内容:(三个

There has been a lot of talks about pandoc error 67 since 2014. You can find some of that in the following links: (one, two, three, four). The only workaround I heard about is disabling self-contained (self_contained: no)

我希望有帮助.

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

这篇关于在RStudio中编织默认RMarkdown文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆