29.01.2015 Views

Analysing spatial point patterns in R - CSIRO

Analysing spatial point patterns in R - CSIRO

Analysing spatial point patterns in R - CSIRO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10.3 Manipulat<strong>in</strong>g images 69<br />

0 200 600 1000<br />

hickory<br />

400 800 1200 1600<br />

0 200 600 1000<br />

maple<br />

redoak<br />

400 800 1200 1600 100 300 500<br />

100 300 500<br />

This command divided the Lans<strong>in</strong>g Woods <strong>po<strong>in</strong>t</strong> pattern dataset <strong>in</strong>to 6 sub-<strong>patterns</strong> of<br />

different tree species, extracted the 3 most common species, computed the kernel smoothed<br />

<strong>in</strong>tensity estimate for each species, and then displayed scatterplots of the <strong>in</strong>tensity estimates for<br />

each pair of species. The plot suggests that hickory and maple trees are strongly segregated<br />

from one another (s<strong>in</strong>ce a high density of hickories is strongly associated with a low density of<br />

maples).<br />

10.3 Manipulat<strong>in</strong>g images<br />

10.3.1 Subsets of an image<br />

The subset operator [ has a method for pixel images, [.im:<br />

> X[S]<br />

> X[S, drop = TRUE]<br />

The subset to be extracted is determ<strong>in</strong>ed by the <strong>in</strong>dex argument S.<br />

If S is a <strong>po<strong>in</strong>t</strong> pattern, or a list(x,y), then the values of the pixel image X at these <strong>po<strong>in</strong>t</strong>s<br />

are extracted, and returned as a vector.<br />

If S is a w<strong>in</strong>dow (an object of class "ow<strong>in</strong>"), the values of the image <strong>in</strong>side this w<strong>in</strong>dow<br />

are extracted. The result is a pixel image if possible, and a numeric vector otherwise (see<br />

help("[.im") for details).<br />

Copyright<strong>CSIRO</strong> 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!