Skip to content

regions in Gabriel graph

1 message · Ondřej Mikula

#
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