Analysing spatial point patterns in R - CSIRO
Analysing spatial point patterns in R - CSIRO
Analysing spatial point patterns in R - CSIRO
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
20 Introduction to spatstat<br />
Instructions on how to <strong>in</strong>stall a package are given atcran.r-project.org. If you are runn<strong>in</strong>g<br />
W<strong>in</strong>dows, first start an R session. Then try the pull-down menu item Packages — Install<br />
packages. If this menu item is available, then you will be able to download and <strong>in</strong>stall any<br />
desired packages by simply select<strong>in</strong>g the package name from the pulldown list. If this menu item<br />
is not available (for <strong>in</strong>ternet security reasons), you can manually download packages by go<strong>in</strong>g<br />
to the CRAN website under Contributed packages --- W<strong>in</strong>dows b<strong>in</strong>aries and download<strong>in</strong>g<br />
the desired zip files of W<strong>in</strong>dows b<strong>in</strong>ary files. To perform step 2, start an R session and use the<br />
menu item Packages — Install from local zip files to <strong>in</strong>stall.<br />
If you are runn<strong>in</strong>g L<strong>in</strong>ux, step 1 is performed manually by go<strong>in</strong>g to the CRAN website under<br />
Contributed Packages and download<strong>in</strong>g the tar filepackagename.tar.gz. Step 2 is performed<br />
by issu<strong>in</strong>g the command R CMD INSTALL packagename.tar.gz.<br />
4 Introduction to spatstat<br />
4.1 The spatstat package<br />
Spatstat is a contributed R package for analys<strong>in</strong>g <strong>spatial</strong> data, written by Adrian Baddeley<br />
and Rolf Turner. Current versions of spatstat deal ma<strong>in</strong>ly with <strong>spatial</strong> <strong>po<strong>in</strong>t</strong> <strong>patterns</strong> <strong>in</strong><br />
two dimensions. The package supports<br />
creation, manipulation and plott<strong>in</strong>g of <strong>po<strong>in</strong>t</strong> <strong>patterns</strong><br />
exploratory data analysis<br />
simulation of <strong>po<strong>in</strong>t</strong> process models<br />
parametric model-fitt<strong>in</strong>g<br />
hypothesis tests<br />
residual plots, model diagnostics<br />
Spatstat is one of the largest contributed packages available for R, conta<strong>in</strong><strong>in</strong>g over 1000<br />
user-level functions and a 750-page manual. It has its own web doma<strong>in</strong>, www.spatstat.org,<br />
offer<strong>in</strong>g <strong>in</strong>formation about the package.<br />
Spatstat can be downloaded from cran.r-project.org (under ‘Contributed packages —<br />
spatstat’). To <strong>in</strong>stall spatstat you will also need to download the package deldir (some other<br />
packages are also recommended but not compulsory).<br />
4.2 Please acknowledge spatstat<br />
If you use spatstat for research that leads to publications, it would be much appreciated if you<br />
could acknowledge spatstat <strong>in</strong> your publications, preferably cit<strong>in</strong>g [10]. Citations help us to<br />
justify the expenditure of time and effort on ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g and develop<strong>in</strong>g the package.<br />
4.3 Gett<strong>in</strong>g started<br />
Here is a quick demonstration of spatstat <strong>in</strong> action. You can follow the demonstration by<br />
typ<strong>in</strong>g the commands <strong>in</strong>to R.<br />
To beg<strong>in</strong> any analysis us<strong>in</strong>g spatstat, first start the R system, and type<br />
> library(spatstat)<br />
Copyright<strong>CSIRO</strong> 2010