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.

9.3 Example 59<br />

You may also notice a l<strong>in</strong>e of trees at the right-hand edge of the study region. It looks<br />

as though the study region may have <strong>in</strong>cluded some trees that were planted as a boundary or<br />

avenue. This sticks out like a sore thumb if we plot the x coord<strong>in</strong>ates of the trees:<br />

> hist(nztrees$x, nclass = 25)<br />

Histogram of nztrees$x<br />

Frequency<br />

0 2 4 6 8 10<br />

0 50 100 150<br />

We might want to exclude the right-hand boundary from the study region, to focus on the<br />

pattern of the rema<strong>in</strong><strong>in</strong>g trees. Let’s say we decide to trim a 5-foot marg<strong>in</strong> off the right-hand<br />

side.<br />

First we create the new, trimmed study region:<br />

> chopped w<strong>in</strong> chopped chopped<br />

w<strong>in</strong>dow: rectangle = [0, 148] x [0, 95] feet<br />

(Notice that chopped is not a <strong>po<strong>in</strong>t</strong> pattern, but simply a rectangle <strong>in</strong> the plane.)<br />

Then, us<strong>in</strong>g the subset operator [.ppp, we simply extract the subset of the orig<strong>in</strong>al <strong>po<strong>in</strong>t</strong><br />

pattern that lies <strong>in</strong>side the new w<strong>in</strong>dow:<br />

> nzchop summary(nzchop)<br />

Planar <strong>po<strong>in</strong>t</strong> pattern: 78 <strong>po<strong>in</strong>t</strong>s<br />

Average <strong>in</strong>tensity 0.00555 <strong>po<strong>in</strong>t</strong>s per square foot<br />

W<strong>in</strong>dow: rectangle = [0, 148]x[0, 95]feet<br />

W<strong>in</strong>dow area = 14060 square feet<br />

Unit of length: 1 foot<br />

> plot(density(nzchop, 10))<br />

> plot(nzchop, add = TRUE)<br />

Copyright<strong>CSIRO</strong> 2010

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

Saved successfully!

Ooh no, something went wrong!