[R] regions in Gabriel graph
Ondřej Mikula
onmikula at gmail.com
Fri Sep 7 12:16:00 CEST 2012
Dear list,
following the vignette of the package 'spacemmakeR' I have built a
gabriel graph of ten randomly placed points:
library(spdep)
set.seed(3)
xyir<-matrix(runif(20),10,2)
nbgab<-graph2nb(gabrielneigh(xyir), sym=TRUE)
plot(nbgab,xyir,points=FALSE)
points(xyir,pch=20,cex=2,col=c(2,4,4,4,2,2,4,2,4,4))
title(main="Gabriel Graph")
Now, I need to determine for any additional point whether it is
located within the region surrounded by links between identically
colored points. Would anybody give me a hint how to a achieve this?
Thanks in advance,
Ondřej Mikula
--
Ondřej Mikula
Institute of Animal Physiology and Genetics
Academy of Sciences of the Czech Republic
Veveri 97, 60200 Brno, Czech Republic
Institute of Vertebrate Biology
Academy of Sciences of the Czech Republic
Studenec 122, 67502 Konesin, Czech Republic
More information about the R-help
mailing list