Re: [R-sig-Geo] raster: stackApply problems..

2019-11-22 Thread Leonidas Liakos via R-sig-Geo
Thank you Jon! In fact, that's how I thought it worked. And that's how it worked for me all the time! But recently, doing some manual checks on some indices I couldn't confirm it ... I tried to replicate the problem and my workflow with test data

Re: [R-sig-Geo] raster: stackApply problems..

2019-11-22 Thread Jon.SKOIEN
Leonidas, I see that you are not happy with the output, but it is not so clear what you actually expect to see. If you use stackApply directly, the indices are used in the names. Layer 1 and 8 belong to the group with index 4. It is the first group in the list of indexes, so the first layer

Re: [R-sig-Geo] Comparing distance among point pattern events

2019-11-22 Thread Sarah Goslee
Hi, Great question, and clear example. The first problem: ACd<-pairdist(A) instead of ACd <- pairdist(AC) BUT pairdist() is the wrong function: that calculates the mean distance between ALL points, A to A and C to C as well as A to C. You need crossdist() instead. The most flexible approach

[R-sig-Geo] Comparing distance among point pattern events

2019-11-22 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo Members, I have the hypothetical point process situation: library(spatstat) set.seed(2019) A <- rpoispp(100) ## First event B <- rpoispp(50) ## Second event C <- rpoispp(50) ## Third event plot(A, pch=16) plot(B, col="red", add=T) plot(C, col="blue", add=T) I've like to know an