om: Francesco Perugini [mailto:francesco.perug...@yahoo.it]
Sent: martedì 2 febbraio 2016 09:24
To: Giorgio Garziano
Subject: Re: [R] R Sig-Geo group - loop for creating spatial matrix
Dear Giorgio,
thanks a lot for your reply.
From here now, I want to implement the Global G test for spatial
autoco
You may handle that as a list of "nb" objects.
library(spdep)
example(columbus)
coord <- coordinates(columbus)
z <- c(1,2,3,4,5,6,7,8,9)
neighbors.knn <- list()
for (val in z) {
neighbors.knn <- c(neighbors.knn, list(knn2nb(knearneigh(coord, val,
longlat=F), sym=F)))
}
class(neighbours.knn)
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
3 matches
Mail list logo