3 \title{Test for Binary Tree}
8 \item{phy}{phylogenetic tree (i.e. an object of class \code{"phylo"}).}
11 This function tests whether a phylogenetic tree is binary, i.e. whether every node
12 (including the root node) has exactly two descendant nodes. In this case the number
13 of edges in the tree equals 2 n - 2 where n is the number of taxa (tips) in the tree.
16 \code{is.binary.tree} returns \code{TRUE} if \code{tree}
17 is a fully binary phylogenetic tree, otherwise it returns \code{FALSE}.
20 \code{\link{read.tree}}, \code{\link{is.ultrametric}}, \code{\link{multi2di}}
23 \author{Korbinian Strimmer (\url{http://www.stat.uni-muenchen.de/~strimmer/})}
26 data("hivtree.newick") # example tree in NH format
27 tree.hiv <- read.tree(text = hivtree.newick) # load tree
29 is.binary.tree(tree.hiv)
33 unlink("hivtree.phy") # delete the file "hivtree.phy"