Learn R Programming

phytools (version 0.3-72.1)

map.to.singleton: Converts a mapped tree to a tree with singleton nodes

Description

The function map.to.singleton takes an object of class "phylo" with a mapped discrete character and converts it to a tree with singleton nodes, in which edge has only one state. The states for each edge are stored in names(tree$edge.length). plotTree.singletons plots a tree with singleton nodes.

Usage

map.to.singleton(tree)
plotTree.singletons(tree)

Arguments

tree
a modified object of class "phylo" with a mapped discrete character or (for plotTree.singletons a tree with singleton nodes.

Value

  • An object of class "phylo" with singleton nodes. plotTree.singletons plots a tree. If names(tree$edge.length)!=NULL it will use a different color from palette for each mapped state.

See Also

collapse.singles, make.simmap