nrDesc: Number of descendants

Description Usage Arguments Value Author(s) See Also Examples

View source: R/merge_order.R

Description

Get the number of descendants for each node in the tree.

Usage

1
nrDesc(tree)

Arguments

tree

(phylo) a phylogenetic tree.

Value

(numeric)

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca

See Also

Ntip, getNodeIDs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
m <- matrix(c(0,1,2,3, 1,0,1.5,1.5, 2,1.5,0,1, 3,1.5,1,0), byrow = TRUE,
            ncol = 4, dimnames = list(c("run1", "run2", "run3", "run4"),
                                      c("run1", "run2", "run3", "run4")))
distMat <- as.dist(m, diag = FALSE, upper = FALSE)
## Not run: 
tree <- getTree(distMat)
getNodeIDs(tree)
nrDesc(tree)

## End(Not run)

Roestlab/DIAlign documentation built on Feb. 25, 2021, 5:18 p.m.