[R-sig-Geo] rgeos::gArea() to all polygons within sp polygons DF

Agustin Lobo alobolistas at gmail.com
Sun Apr 8 16:52:21 CEST 2012


Hi!

How do I  apply gArea()) to all polygons within an spatial pol. DF?
I've tried
areas <- apply(BorneoLCg,gArea)
and
areas <- sapply(BorneoLCg,gArea)

but this is not correct.

I want to compare to
areas <- sapply(BorneoLCg at polygons, function(x) x at area)

Thanks

Agus



More information about the R-sig-Geo mailing list