[R-sig-Geo] (no subject)

Adrian Baddeley adrian at maths.uwa.edu.au
Thu Mar 15 04:21:01 CET 2007

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.
	   pot <- disc(R, c(x0,y0))
creates a window (owin object) representing the pot,
	   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!  %^]

Adrian Baddeley

More information about the R-sig-Geo mailing list