I'm trying to get the area of all the polygons in a SpatialPolygonsDataFrame: parcProj.
library("rgeos")gArea(parcProj[2,])works fine but:
apply(parcProj,1,gArea)or
sapply(parcProj@polygons,gArea)don't.
Any standard way to do an apply besides the obvious:
for(i in 1:length(parcProj)) areas
library("rgeos")gArea(parcProj[2,])works fine but:
apply(parcProj,1,gArea)or
sapply(parcProj@polygons,gArea)don't.
Any standard way to do an apply besides the obvious:
for(i in 1:length(parcProj)) areas