rdsobj<- FlowConnect()
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)
seg_dir<- graph(c("2","paris", "meaux", "2", "melun", "2","5", "melun","nemours", "5", "sens", "5"),
directed = TRUE)
fcg<- FlowConnectionGraph(seg_dir)
subset(rdsobj, from = fcg, g = seg, U_bar = c("2", "5"), matrixForm = TRUE)
subset(rdsobj, from = fcg, g = seg, vertices=c("paris", "meaux", "melun", "nemours", "sens"))
subset(rdsobj, from = fcg, g = seg)
Run the code above in your browser using DataLab