R/BuildEdgelist.R

Defines functions FindRoot

Documented in FindRoot

FindRoot <- function(tree.el) {
    tree.el.tmp <- tree.el
    colnames(tree.el.tmp) <- c('parent', 'child')
    root <- unique(tree.el.tmp[which(!(tree.el.tmp[, 1] %in% tree.el.tmp[, 2])), 1]) # no edge leads to root
    return(root = root)
}

Try the structSSI package in your browser

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

structSSI documentation built on May 2, 2019, 11:26 a.m.