seg<- graph(c(1,2, 2,3, 2,4, 4,5, 5,6, 5,7), directed = FALSE)
name_stat<- c("paris", "2", "meaux", "melun", "5", "nemours", "sens")
seg<- set.vertex.attribute(seg, "name", V(seg), name_stat)
rdsobj<- Neighborhood()
subset(rdsobj, 2, seg)
subset(rdsobj, 2, seg, U_bar = c("melun", "5"), matrixForm = TRUE)
Run the code above in your browser using DataLab