【发布时间】:2016-05-25 15:24:13
【问题描述】:
我有一个使用 googleVis 库的 Rmarkdown 文档。 它在 RStudio 上运行良好。我只需按下“Knit HTML”按钮和“voilá”:我得到了一个漂亮的 HTML。
但是,当我尝试在命令行上生成时,我在 Pandoc 中遇到错误。
我只是跑:
Rscript --verbose -e 'script.R'
script.R 在哪里:
rmarkdown::render("inputFile.Rmd", output_dir=file.path("/path/to/my/dir"), output_file="outfile.html", encoding="UTF-8");
我得到的错误是这样的:
(.....)
output file: 5c86eb19-d29f-4ac6-ac35-87e72fb42bbd2787560825121738853.knit.md
/opt/local/bin/pandoc +RTS -K512m -RTS 5c86eb19-d29f-4ac6-ac35-87e72fb42bbd2787560825121738853.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output /Users/rodrigo/Documents/Nitryx/Technical/Projects/NitroERP/repository/5c86eb19-d29f-4ac6-ac35-87e72fb42bbd.html --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 2 --variable toc_float=1 --variable toc_selectors=h1,h2 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --template /opt/local/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rmarkdown/rmd/h/default.html --number-sections --variable 'theme:bootstrap' --include-in-header /var/folders/dd/y3fs2t5j1n3fg8nfq1syrzym0000gn/T//RtmpTjWUT6/rmarkdown-str301943f9d761.html --mathjax --variable 'mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --no-highlight --variable highlightjs=/opt/local/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rmarkdown/rmd/h/highlight --variable navigationjs=/opt/local/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rmarkdown/rmd/h/navigation-1.0
Fetching https://www.google.com/jsapi?callback=displayChartGaugeID30195c82acb7...
pandoc: Failed to retrieve https://www.google.com/jsapi?callback=displayChartGaugeID30195c82acb7
user error (https not supported)
Error: pandoc document conversion failed with error 61
Execution halted
注意:
pandoc: Failed to retrieve https://www.google.com/jsapi?callback=displayChartGaugeID30195c82acb7
user error (https not supported)
但它适用于 RStudio...
你能帮忙吗?
【问题讨论】:
-
未来注意事项:cdn.mathjax.org 即将结束生命周期,请查看mathjax.org/cdn-shutting-down 了解迁移提示。
标签: rstudio r-markdown pandoc googlevis