phylobase (version 0.8.2)

hasSingle: Test trees for polytomies, inline nodes (singletons), or reticulation

Description

Methods to test whether trees have (structural) polytomies, inline nodes (i.e., nodes with a single descendant), or reticulation (i.e., nodes with more than one ancestor). hasPoly only check for structural polytomies (1 node has more than 2 descendants) and not polytomies that result from having edges with a length of 0.

Usage

hasSingle(object)
"hasSingle"(object)
hasRetic(object)
"hasRetic"(object)
hasPoly(object)
"hasPoly"(object)

Arguments

object
an object inheriting from class phylo4

Value

Logical value

Examples

Run this code

tree.owls.bis <- ape::read.tree(text="((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3);")
owls4 <- as(tree.owls.bis, "phylo4")
hasPoly(owls4)
hasSingle(owls4)

Run the code above in your browser using DataCamp Workspace