[circular window for spatstat]
Thanks very much, Adrian. -Michael
Adrian Baddeley wrote:
On Tue, 13 Mar 2007, Michael Friendly wrote:
I've read the documentation, but can't find an example of how to specify a circular window for the ppp object that would contain the data and the window.
To create a circular window in spatstat, you can use the function disc(). See help(disc). For example suppose a point pattern with coordinates x, y (two vectors) is observed inside a pot with centre (x0, y0) and radius R. Then pot <- disc(R, c(x0,y0)) creates a window (owin object) representing the pot, and X <- ppp(x, y, window=pot) creates the point pattern. Since spatstat always plots spatial objects isometrically, you can also use plot(disc(....)) just to draw a circle.
The data structure is something like a data frame for all the germinating seeds, recording (X,Y) location and maybe some other measure like size after xx days: PotID Treatment SeedType X Y size
Currently, a point pattern can only have one mark variable (e.g. you can attach the SeedType to each point, or attach the size to each point, but not both). This will change in spatstat version 2 which will be released soon.
(Is there something better?)
There is nothing better than spatstat! %^] regards Adrian Baddeley
Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA