Skip to content
Prev 17992 / 29559 Next

Error in function (classes, fdef, mtable)

On Fri, 12 Apr 2013, Ross Ahmed wrote:

            
You are indexing the wrong object - not columbus but sectorsPoly should 
be indexed 1:25:

llply(1:25, function(x) gArea(gIntersection(sectorsPoly[x,],
   columbus, byid=TRUE), byid=TRUE)/gArea(sectorsPoly[x,]))

works. Thanks for a reproducible example! Note that we do not know the CRS 
of columbus, I think the units are some multiple of miles or km, and that 
it is projected in an unknown projection.

Hope this helps,

Roger