Thanks for the reply Virgilio,
>> 2) Will opgam/kn.iscluster only detect "hotspots" or will they also detect
>> "coldspots" i.e. areas of statistically unlikely lower incidence rates ?
>You get a p-value, so you could take the areas with very large p-values
>as cold-spots. But detection of cold-s
Oops -- regarding my last reply, I see now that the approach with
'extract' using 'weights' was actually your original method at the start
of this thread -- so, apparently it is slow. I don't know if the
spsample+extract approach would be faster or not.
Interesting -- this issue didn't arise in my application.
Note that 'extract' includes an argument called 'weight', which will
apparently return the cell value & the fraction of each cell which is
inside the polygon. This should be enough to compute the weighted
average in a case like yours. I