R/children.R

Defines functions children_unsrt children

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

children_unsrt <- function(node, G) {
  ch.ind <- unique(unlist(igraph::neighborhood(G, order = 1, nodes = node, mode = "out")))
  ch <- igraph::V(G)[ch.ind]$name
  return(ch)
}

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.