【问题标题】:Osmar package in R "Error in file(con, "r") : cannot open the connection"R中的Osmar包“文件错误(con,“r”):无法打开连接”
【发布时间】:2017-11-06 13:06:18
【问题描述】:

我正在尝试在我的 Windows 10 R 3.4.2 上运行 osmar 包,并已正确安装了 osmosis。但是,当我尝试运行代码时:

>library("osmar")
>
>src <- osmsource_osmosis(file = "c:/users/ben_c/Documents/FYP/FYP_NL_Map/muenchen.osm", osmosis = "osmosis")
>
>
>nl_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000)
>
>nl <- get_osm(nl_bbox, src)
>
>plot(nl)

在渗透运行后我收到警告:

>Error in file(con, "r") : cannot open the connection
>In addition: Warning message:
>In file(con, "r") :
>  cannot open file 
>'C:\Users\ben_c\AppData\Local\Temp\Rtmp8YYPkZ\file1b182fca7802': No such file or directory

我在运行演示时也遇到了同样的错误:

>demo("navigator")

我对 R 比较陌生,因此非常感谢任何帮助。

提前致谢,

【问题讨论】:

  • 也许你应该删除“文件”,src &lt;- osmsource_osmosis("c:/users/ben_c/Documents/FYP/FYP_NL_Map/muenchen.osm", osmosis = "osmosis")
  • 谢谢,刚刚试过了,还是出现同样的错误!

标签: r path openstreetmap osmosis osmar


【解决方案1】:

我有非常相似的错误。我可以通过以管理员身份运行 R(在我的情况下为 RStudio)来解决问题。

我认为问题在于无法创建临时文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-19
    • 2013-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多