I want to apply a function, either one that I have written, or one from a package such as the gArea function (e.g. gArea('shapefile')) from the rgeos package, across a list of shapefiles that I have imported.
I imported the files like this:
data <- list.files (getwd() , pattern="shp")
I have tried using methods using functions such as lapply etc once I have tried amalgamating the files by using as.list, as.data.frame etc but with no luck. Functions applied to single imported shapefiles work fine, but obviously no good for serioues throughput.
Thoughts?
You could try something like this: