【发布时间】:2021-01-21 20:03:09
【问题描述】:
在 R Studio 中编码。 尝试复制此处概述的演示: https://wcmbishop.github.io/rayshader-demo/.
在尝试运行他的获取海拔 UDF 时,我遇到了以下错误:
> elev_file <- file.path("data", "brussels.tif")
> get_usgs_elevation_data(bbox, size = image_size$size, file = elev_file,
+ sr_bbox = 4326, sr_image = 4326)
Error in file(con, "wb") : cannot open the connection
In addition: Warning message: In file(con, "wb") :
Error in file(con, "wb") : cannot open the connection
我对 R 和编程/编码很陌生,不知道这是想告诉我什么。我在网上看过,但没有多大成功。
【问题讨论】:
-
file.exists(elev_file)是真的吗? -
@r2evans:file.exists(elev_file) 中的错误:找不到对象“elev_file”
-
嗯... 那是你的对象。您是否创建了该对象?无论如何,
file.exists("data/brussels.tif")是否返回 true? -
我这么认为?你可以在这里检查我的代码。忽略第 137 行之后的任何内容 :) github.com/Jonathan-121/Rayshader_Trial/blob/main/…
-
非常感谢@r2evans,如果我无法弄清楚,我会看看并恢复!非常感谢。
标签: r