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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -