[R-sig-Geo] construct neighbor list from polygon list with user defined distance thresholds, as found in GeoDa?

Roger Bivand Roger.Bivand at nhh.no
Fri Jan 11 19:00:30 CET 2008


On Fri, 11 Jan 2008, Debarchana Ghosh wrote:

> Hi,
>
> After reading a ESRI shape file I want to create a neighbor list (class nb)
> from the polygon list by defining a distance thresholds for example 2500m.
> This is a option in GeoDa weights creation. However I couldn't find any
> function in R to do this. The function poly2nb is based on the 'Queen'
> contiguity method.

Looking at the HTML help for the package ought to get you there, 
alternatively scrolling through help(package=spdep)

RSiteSearch("distance neighbours, restrict=c("functions", "docs")")

gets you there first hit (please recall that the spdep author tries to use 
conservative British English - hence neighbour, randomisation, etc.). 
Other spellings can be abbreviated:

RSiteSearch("distance neigh*", restrict=c("functions"))

gets 7th hit to:

?dnearneigh, that is.

If you need alternatives that are not in spdep (such as mean spanning 
tree), look at packages like ade4 (see the search results for ideas).

Roger

>
> Thanks for your help.
> Debs.
>
>
>
>

-- 
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-sig-Geo mailing list