Hi,

I'm new to R and I discover this huge world with much enthusiasm. I'm from
France. Excuse me in advance for my english.

I've got a SpatialGridDataFrame SG with density values given by spatstat
package
I want to get the average values of this grid for each polygon of a dataset
named iris

I applied the function overlay and managed to get a new spatialGridDataFrame
object with the average values but it's a spatialPolygonsDataFrame that I
want.

Any help would be greatly appreciated.

--
Here's what I've accomplished for the moment:
o<-overlay(SG,iris.b,fn=mean)
df<-data.frame("densiteMoyenne"=o)
SGm<-SpatialGridDataFrame(as(SG,"SpatialGrid"),data=df)
Now, I should inject the average values to my polygons but there might have
been an easier way to create an iris spPolDF with the average values
directly?
--

Mathieu

	[[alternative HTML version deleted]]

