R/descendants.R

Defines functions descendants

descendants <- function(node, G, topo) {
  de.ind <- unique(unlist(igraph::neighborhood(G, order = igraph::vcount(G), nodes = node, mode = "out")))
  de <- igraph::V(G)[de.ind]$name
  de <- de %ts% topo
  return(de)
}

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.