I have thousand files and each one contains a .shp
. The names of my files are file_sh1,file_sh2,..,file_sh5000
and the names of the .shps
are the same.I am trying to read them in R and then export them (all .shps
in one file) but I get the error "Error in getinfo.shape(fn) : Error opening SHP file"
.
my code so far:
fle=list()
for (i in 1:5000){
fle[[i]]=readShapeSpatial("fle/file_sh",i,"/file_sh",i,".shp")
}
How can I read the .shps
from the files and export them in one?