ape (version 2.0-2)

unique.multi.tree: Revomes Duplicate Trees

Description

This function scans a list of trees, and returns a list with the duplicate trees removed. By default the labelled topologies are compared.

Usage

## S3 method for class 'multi.tree':
unique(x, incomparables = FALSE,
        use.edge.length = FALSE,
        use.tip.label = TRUE, ...)

Arguments

x
an object of class "multi.tree".
incomparables
unused (for compatibility with the generic).
use.edge.length
a logical specifying whether to consider the edge lengths in the comparisons; the default is FALSE.
use.tip.label
a logical specifying whether to consider the tip labels in the comparisons; the default is TRUE.
...
further arguments passed to or from other methods.

Value

  • an object of class c("multi.tree", "phylo") which is a list of objects of class "phylo".

See Also

all.equal.phylo, unique for the generic R function, read.tree, read.nexus

Examples

Run this code
TR <- replicate(50, rtree(4), simplify = FALSE)
class(TR) <- c("multi.tree", "phylo") # set the class!
length(unique(TR)) # not always 15...
howmanytrees(4)

Run the code above in your browser using DataLab