[R] bivirate k-function

Roger Bivand Roger.Bivand at nhh.no
Mon Sep 5 22:06:34 CEST 2005

On Mon, 5 Sep 2005, Michael Holm wrote:

> Hi
> Is there anyone who can help a reporter (me) with the following:
> I want to use the bivirate k-function to determin if burgerbars are
> clustered around schools.
> To that purpose I’ve been told to use the bivirate k-function, but my
> program Arcview doesn’t contain that.
> Im stuck on a dead end – how to I for a start get the data into R?

The file format prefered by ArcView for point data is shapefile - see 
packages maptools or shapefiles on CRAN. Bivariate K-hat functions are 
available in splancs (k12hat), or in spatstat (Kcross and Kdot). A direct 
reference to the splancs functions is given by Bailey and Gatrell (1995) 
Interactive Spatial Data Analysis, Ch. 4. Spatstat is described clearly 


You may need to import a bounding polygon too.

Please feel free to follow this up on the R-sig-geo list, access easiest
from the CRAN "Spatial" task view:


(Note though, that schools may be close to other confounding locations
attracting burger-vores, so you may need a school just by itself to draw
any sensible conclusions)

> Michael Holm
> DICAR – Center for Anaytical Reporting – HYPERLINK
> "http://www.dicar.org/"www.dicar.org

Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-help mailing list