Dear all,I want to create a routine to generate an object for different value 
of val: 

z <- c(1,2,3,4,5,6,7,8,9)
for (val in z) {
 neighbors.knn <- knn2nb(knearneigh(coord, val, longlat=F),
 row.names=cod_pro,sym=F)
 }
 
However, it seems it does not work. 
How to store the neighbors.knn created matrix befoire being overwritten.
In other words, I want to create multiple spatial matrix, say, for different k 
neighbours.
Thanks a lot for any help. 
francper


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to