read files with pattern in R, error -
i have file in directory multiple shapefiles (about 2000) , want read them in r. far have tried following :
list.files("my_directory",pattern=".shp") list_here=list.files("my_directory",pattern=".shp") (i in 1:length(list_here)){ bi[[i]]=readshapespatial(list_here[i]) proj4string(bi[[i]])= crs("+proj=longlat +datum=wgs84 +no_defs") }
but error error in getinfo.shape(fn) : error opening shp file
each shapefile consists of .dbf,.prj,.shp,.shx
files. when try read 1 or 2 of them have no problem when try read them in list aforementioned error.
can me?
Comments
Post a Comment