【发布时间】:2017-09-18 11:45:14
【问题描述】:
以前只需使用 Rstudio 'knit' 按钮就可以很好地在 html 中呈现的 Markdown 现在不会了。这是 windows,R3.4.1,以及更新的 knitr 和 rmarkdown,上周整体运行良好。我有最小的 .rprofile,并且在编写下面的最小文档之前没有加载任何包。如下所示的“手动”编织工作,即 gvisTable 和 mathjax 在 html 中正确呈现,所以这不应该是我今天的互联网连接的问题(我也尝试了替代连接,但没有什么不同):
knitr::knit(in,out=md) markdown::markdownToHTML(md,ht)
但是以下(我相信这是“编织”按钮的作用,借用自 What does “Knit HTML” do in Rstudio 0.98?)会引发错误
rmarkdown::render(pp, 'html_document', 'new_titel.html')
中的错误消息相当长,所以我现在附加它,因为我缺乏声誉,URL 被审查。我试过谷歌搜索,所以等等,但没有结果。帮助表示赞赏。
"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
---------------最小的文档,如果我注释掉 gvisTable 行或使用上面描述的 markdown 路由而不是 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)
```
【问题讨论】:
标签: r knitr r-markdown googlevis