R/distNNeigh.r

Defines functions distNNeigh

Documented in distNNeigh

distNNeigh<-function(db){
  db<-as.matrix(db)
  nn<-knearneigh(db,use_kd_tree=FALSE)
  nn<-knn2nb(nn)
  res<-unlist(nbdists(nn,db))
  res
}

Try the pgirmess package in your browser

Any scripts or data that you put into this service are public.

pgirmess documentation built on May 29, 2024, 4:26 a.m.