R/connected.R

Defines functions connected

connected <- function(y, G, topo) {
  connected <- unique(unlist(igraph::neighborhood(G, order = igraph::vcount(G), nodes = y, mode = "all")))
  co <- igraph::V(G)[connected]$name
  co <- co %ts% topo
  return(co)
}

Try the causaleffect package in your browser

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

causaleffect documentation built on July 14, 2022, 5:07 p.m.