r - 在 R 中读取 shapefile 时出错
问题描述
当我尝试在 R 中循环读取 shapefile 时,它总是报告
“.local(x, ...) 中的错误:file.exists(extension(x, ".shp")) 不是 TRUE”。
我用来读取 shapefile 的代码是
"city.i=shapefile(citynames1[i]) "
其中 citynames1 是 shapefile 名称的向量,扩展名为.shp
.
非常感谢您的帮助。