gpt4 book ai didi

r - Leaflet 在 R Markdown 中导致错误

转载 作者:行者123 更新时间:2023-12-03 02:24:46 24 4
gpt4 key购买 nike

当我尝试将 R Markdown(在 R Studio 中)与 Leaflet 一起使用时,出现错误并且失败。这是一个简单的 R Markdown 脚本以及我收到的错误。我已经尝试了我能想到的一切,包括:重新安装和更新各种软件包、重新启动 R Studio、更新我的 R 和 R Studio、重新启动、创建简化的脚本(例如下面的脚本)等。注意:如果我在常规 R 脚本中运行 2 行 R 代码,它会显示没有错误的 map ,因此我知道问题可能不在于传单。

预先感谢您的任何想法或建议。

---
title: "Untitled"
author: "David Wilkes"
date: "March 30, 2017"
output: html_document
---

This is an R Markdown test for leaflet

```{r}
library(leaflet)
leaflet() %>% addTiles %>% setView(lng = 5.0, lat = 51.0, zoom = 6)
```

pandoc.exe: Could not fetch E:\MYDOCU~1\R\R-33~1.3\library\leaflet\HTMLWI~1\lib\leaflet\#default#VML
E:\MYDOCU~1\R\R-33~1.3\library\leaflet\HTMLWI~1\lib\leaflet\: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 67
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS slides_test.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output slides_test.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "E:\MYDOCU~1\R\R-33~1.3\library\RMARKD~1\rmd\h\DEFAUL~1.HTM" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\ya1dwil1\AppData\Local\Temp\RtmpQFfqPh\rmarkdown-str19f072517d2.html" --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' had status 67
Execution halted

最佳答案

真的很痛苦。

我也遇到了同样的问题。我更新了 Pandoc 和 R。现在,它可以工作了。这是我的 session 信息:

R version 3.4.3 (2017-11-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

Rcpp_0.12.14 knitr_1.18 magrittr_1.5
flexdashboard_0.5.1 xtable_1.8-2 lattice_0.20-35
R6_2.2.2

stringr_1.2.0 tools_3.4.3 grid_3.4.3
htmltools_0.3.6 leafletplugins_0.0.1 crosstalk_1.0.0
yaml_2.1.16

leaflet_1.1.0 rprojroot_1.3-2 digest_0.6.13
shiny_1.0.5 htmlwidgets_1.0 evaluate_0.10.1
mime_0.5

rmarkdown_1.8 stringi_1.1.6 compiler_3.4.3
backports_1.1.2 jsonlite_1.5 httpuv_1.3.5

希望有帮助。

关于r - Leaflet 在 R Markdown 中导致错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43125442/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com