<html><body><div>Dear R-sig Geo people,</div><div>I've run a quadrat.test on a "ppp" object, for which the obs. window "owin" is a convex polygon:</div><div><br></div><div><div>> summary(my.ppp)</div><div>Planar point pattern: 660 points</div><div>Average intensity 0.461 points per square kilometer </div><div><br></div><div>Window: polygonal boundary</div><div>single connected closed polygon with 41 vertices</div><div>enclosing rectangle: [-7420.406, -7373.856]x[5451.656, 5506.241]kilometer</div><div>Window area = 1432.66 square kilometer </div><div>Unit of length: 1 kilometer </div></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;"><br></span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;"><br></span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">After running the test,</span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">> M <- quadrat.test(my.ppp, nx= 2, ny= 2) </span></span></div><div><br></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">and then</span></span><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;"> printing /</span></span> plotting M, an object of class "quadrattest" "htest", the returned value is plotted as levels (colored tiles) of a pixel image:</div><div><br></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">> M </span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">Chi-squared test of CSR using quadrat counts </span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">data: my.ppp </span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">X-squared = 89.6415, df = 3, p-value < 2.2e-16 </span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;">Quadrats: 4 tiles (levels of a pixel image)</span></span></div><div><span class="Apple-style-span" style="white-space: pre;" _mce_style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal;" _mce_style="white-space: normal;"><br></span></span></div><div><br></div><div>why the pixellation? From what I can gather, it has to do with the row / column matrix indices of my "owin" -- when typing str(M), there's a warning in the digest referring to the window: "Transpose matrices to get the standard presentation in R" "Example: image(result$xcol,result$yrow,t(result$d))" </div><div>Here is that section with the warning:</div><div><br></div><div>>str(M)</div><div><br></div><div><div> .. ..$ window:List of 11</div><div> .. .. ..$ type : chr "mask"</div><div> .. .. ..$ xrange : num [1:2] -7420 -7374</div><div> .. .. ..$ yrange : num [1:2] 5452 5506</div><div> .. .. ..$ dim : int [1:2] 100 100</div><div> .. .. ..$ xstep : num 0.465</div><div> .. .. ..$ ystep : num 0.546</div><div> .. .. ..$ warnings: chr [1:3] "Row index corresponds to increasing y coordinate; column to increasing x" "Transpose matrices to get the standard presentation in R" "Example: image(result$xcol,result$yrow,t(result$d))"</div><div> .. .. ..$ xcol : num [1:100] -7420 -7420 -7419 -7419 -7418 ...</div><div> .. .. ..$ yrow : num [1:100] 5452 5452 5453 5454 5454 ...</div><div> .. .. ..$ m : logi [1:100, 1:100] FALSE FALSE FALSE FALSE FALSE FALSE ...</div><div> .. .. ..$ units :List of 3</div><div> .. .. .. ..$ singular : chr "kilometer"</div><div> .. .. .. ..$ plural : chr "kilometer"</div><div> .. .. . ..$ multiplier: num 1</div><div> .. .. .. ..- attr(*, "class")= chr "units"</div><div> .. .. ..- attr(*, "class")= chr "owin"</div></div><div><br></div><div><br></div><div><div>I understand for "im" objects in {spatstat}, the correspondence between matrix indices mat[i,j] and cartesian coordinates is: rows correspond to the y coordinate, and the columns to the x coordinate. </div><div><br></div><div>But guess I'm just not sure whether and if the row / column index for my "owin" object needs to be transposed, or if this is something to worry about at all. </div><div>I'd created the "owin" by importing it from .shp file (readShapePoly) and then used as(W,"owin"). Is it a problem to do it that way?</div><div> </div><div>Thanks v much for any clarification, and how to 'fix' if necessary?</div></div><div>Robin</div><div><br></div></body></html>