markdown中的googleVis抛出错误67

Ger*_*rry 5 r knitr r-markdown googlevis

之前使用Rstudio'编织'按钮在html中很好地呈现的Markdown现在不会.这是windows,R3.4.1,以及更新的knitr和rmarkdown,整个上周工作正常.我有最小的.rprofile,并且在编织下面的最小文档之前没有加载任何包.一个'手动'编织如下工作,即gvisTable和mathjax在html中正确呈现,所以今天我的互联网连接不应该是一个问题(我也尝试了另一种连接,但没有不同):

knitr :: knit(in,out = md)markdown :: markdownToHTML(md,ht)

然而,以下(我相信'编织'按钮的作用,借用了"编织HTML"在Rstudio 0.98中做什么?)会引发错误

rmarkdown :: render(pp,'html_document','new_titel.html')

这里的错误消息相当长,所以我现在追加它,因为我缺乏声誉而对网址进行审查.我试过谷歌搜索,所以没有结果.帮助赞赏.

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS tmp1.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output new_titel.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "censored" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "censored" --mathjax --variable "censored" 
pandoc.exe: Could not fetch censored
HttpExceptionRequest Request {
  host                 = "www.google.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/jsapi"
  queryString          = "?callback=displayChartTableID1d98417f33e7"
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 (InternalException (HandshakeFailed Error_EOF))
Warning: running command '"" +RTS -K512m -RTS tmp1.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output new_titel.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "censored" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "censored" --mathjax --variable "mathjax-url:censored-not-enough-reputation"' had status 67
Error: pandoc document conversion failed with error 67
Run Code Online (Sandbox Code Playgroud)

---------------最小文档,如果我注释掉gvisTable行或使用上面描述的降价路线而不是rmarkdown,则呈现罚款:

---
title: "Untitled"
output:
  html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
####title

body

$x=y$ 
```{r , echo=FALSE, results='asis'}
require(knitr)
kable(mtcars[1:2,])
require(googleVis)
gvisTable(mtcars)
```
Run Code Online (Sandbox Code Playgroud)

小智 2

几天后,我遇到了同样的问题,之前的 Markdown 文件表现得很好。我有 Windows 7 x64 SP1、R 版本 3.4.1、googleVis 0.6.2、rmarkdown 1.6、knitr 1.17。

有两种解决方法为我解决了这个问题:

1)运行脚本

---
title: "Untitled"
output:
  html_document:
    self_contained: false
---
Run Code Online (Sandbox Code Playgroud)

有效,但输出不再是独立的 HTML 文件,而是依赖于外部文件。这对我来说不是一个选择,因为我需要能够与同事共享 HTML 文件。

2)我发现的唯一其他修复是使用更新的 Pandoc 版本。我之前使用的是 pandoc 1.17.2,现在运行的是 pandoc 2.0。

pandoc --version您可以通过在命令提示符中运行命令来检查 C:\Program Files\RStudio\bin\pandoc 中的 pandoc 版本。

我更新 Pandoc 的方式是

使用更新后的 Pandoc 运行 Markdown 脚本首先产生错误 ( pandoc document conversion failed with error 2),但已通过以下方法解决此问题

---
title: "Untitled"
output:
  html_document:
    smart: false
---
Run Code Online (Sandbox Code Playgroud)

可能不是最优雅的解决方案,但迄今为止唯一对我有用的解决方案。