Hi everyone,
I'm a total newbie in geo, so sorry if my question is basic.

Following chp 9 and chp 10  from "Applied Spatial Data Analysis with R", 
I 've got confused on how to get  from coordinates to a nb-object, 
to get to spatial weights need for modeling.
Seems that the example at pag.245 :

coords<- coordinates(Syracuse)
IDs <- row.names(as(Syracuse, "data.frame"))
library(tripack)
Sy4_nb<- tri2nb(coords, row.names=IDs)
Sy5_nb<- graph2nb(soi.graph(Sy4_nb, coords), row.names=IDs)
Sy6_nb<- graph2nb(gabrielneigh(coords), row.names=IDs)
Sy7_nb<- graph2nb(relativeneigh(coords), row.names=IDs)

in not working anymore, due to the fact that  tri2nd has
been deprecated; so I tried instead 


tritest.tr <- tri.mesh(mydata$x,mydata$y)
tritest.nb<- neighbours(tritest.tr)
class(tritest.nb)
[1] "list"

how can I get tritest.tr to a nb object?
Or there is another way ?

Do I need necessarily a gal file? as I've seen in the examples.
Thanks 

Anna




 >sessionInfo()
R version 2.9.0 Patched (2009-05-03 r48460) 
i686-pc-linux-gnu 

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] tripack_1.2-11  nlme_3.1-91     MASS_7.2-47     xtable_1.5-5   
 [5] lattice_0.17-25 sp_0.9-36       sqldf_0-1.4     gsubfn_0.3-8   
 [9]  proto_0.3-8     RSQLite_0.7-1   DBI_0.2-4       foreign_0.8-35 

loaded via a namespace (and not attached):
[1] grid_2.9.0  tcltk_2.9.0 tools_2.9.0




Anna Freni Sterrantino
Ph.D Student 
Department of Statistics
University of Bologna, Italy
via Belle Arti 41, 40124 BO.



      
	[[alternative HTML version deleted]]

