Skip to content
Prev 5964 / 29559 Next

Reading Shapefile from 600 directories

On Mon, 22 Jun 2009, cheong yoon ling wrote:

            
If you can read the list of folders in appropriate software, and pass it 
into R as a character vector, yes, of course. Note that the .dwg formats 
are proprietary and cannot be read in R - can you discover the folder 
names in any other way? Are there shapefiles with the same name in other 
folders, or can you just search the file system for the target shapefile 
name? Once you have the vector of folder names, just loop over them using 
your choice of shapefile reading function and prefered object class in R 
(packages rgdal, maptools, maybe others too). Your choice will depend on 
why you want to read them in.

Roger