I'm sure there is a simple way to do this but I can't seem to find it. I have an nb object and a list of  the landcover types associated with each node in the neighborhood. I want to create a table showing how many times each landcover class borders every other landcover class, like in the example below.


       Forest Grass Water
Forest      0     0     0
Grass       3     0     0
Water       2     5     0

I couldn't find a function that did this so I wrote a simple one using some of the functions in the "network" library. I'm sure there is a way to do this in the spdep package. How do I ask the nb object for the neighbors of a specific node? The command in the network library is 

x <- get.neighborhood(network,node_id)

I don't mind using the network library but it requires converting the nb object to a network object and I'm sure there is a way to do this without the conversion. Thanks for your help.


Jonathan B. Thayn, Ph.D.
Illinois State University
Department of Geography - Geology
200A Felmley Hall
Normal, Illinois 61790-4400

(309) 438-8112
jthayn@ilstu.edu
my.ilstu.edu/~jthayn






	[[alternative HTML version deleted]]

