Dear List,
I have a SpatialGrid object - a regular 5km by 5km over the entire land
mass of Great Britain & NI - and a SpatialPointsDataFrame containing a
@data slot with several attributes.
I want to identify which points are in each grid cell and average the
values of the individual attributes from the points within each cell.
Not all cells will contain a point (for those an `NA` returned value is
fine) though some cells will contain many points. Later I may wish to
calculate some other summary (min or max) rather than mean.
If I understand correctly, this gives the desired result:
aggregate(fabResults.sp, by = frameGrid, FUN = mean)
where `fabResults.sp` is my SpatialPointsDataFrame and `frameGrid` is my
Spatial Grid. This takes a while to compute however.
I was unable to come up with an `over()` call that worked.
Have I got the `aggregate()` step right? Is there a way to use `over()`
to do the same operation? Am I missing a better alternative?