Learn R Programming

prabclus (version 2.3-4)

geo2neighbor: Neighborhood list from geographical distance

Description

Generates a neighborhood list as required by prabinit from a matrix of geographical distances.

Usage

geo2neighbor(geodist,cut=0.1*max(geodist))

Value

A list of integer vectors, giving the set of neighbors for every region.

Arguments

geodist

dist-object or symmetric non-negative matrix. Geographical distances between regions.

cut

non-negative numerical. All pairs of regions with distance<=cut are treated as neighbors.

Examples

Run this code
data(waterdist)
geo2neighbor(waterdist)

Run the code above in your browser using DataLab