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.2 Operations on ppp objects 55<br />

[1] "larynx" "lung"<br />

> table(type)<br />

type<br />

larynx lung<br />

58 978<br />

9.2 Operations on ppp objects<br />

Directly manipulat<strong>in</strong>g the entries <strong>in</strong>side an object is not safe. It is also unnecessary, because<br />

these manipulations can be performed us<strong>in</strong>g functions or operators.<br />

For <strong>po<strong>in</strong>t</strong> <strong>patterns</strong> (objects of class "ppp") there are the follow<strong>in</strong>g operations.<br />

9.2.1 Extract<strong>in</strong>g and alter<strong>in</strong>g data<br />

n<strong>po<strong>in</strong>t</strong>s(X) number of <strong>po<strong>in</strong>t</strong>s <strong>in</strong> X<br />

marks(X) marks of X<br />

coords(X) coord<strong>in</strong>ates of <strong>po<strong>in</strong>t</strong>s <strong>in</strong> X<br />

as.ow<strong>in</strong>(X) w<strong>in</strong>dow of X<br />

as.rectangle(X) bound<strong>in</strong>g rectangle of X<br />

as.data.frame(X) coord<strong>in</strong>ates and marks of X<br />

marks(X) data(bei)<br />

> bei<br />

Copyright<strong>CSIRO</strong> 2010

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

Saved successfully!

Ooh no, something went wrong!