Hi again!
I am terribly sorry, I got a couple of wrong lines copied into the question
above. The script example should be this:
test2 <- read.gwt2nb("neighbours.txt")
summary(test2)
#and the coordinates:
coox <- c(5,5,5,5,4,3,2,1,1,2,3,4,4,3,2,1,1,2,3,4,4,3)
cooy <- c(4,3,2,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5)
#and a plot for illustration
plot(test2,matrix(cbind(coox,cooy),ncol=2))
text(coox,cooy,as.character(1:22),pos=rep(2,22), col="red", cex=0.8)
The .txt file is the same as above.
Sincerely
Carsten Kirkeby