unique.multiPhylo: Revomes Duplicate Trees

View source: R/unique.multiPhylo.R

unique.multiPhyloR Documentation

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 'multiPhylo'
unique(x, incomparables = FALSE,
        use.edge.length = FALSE,
        use.tip.label = TRUE, ...)

Arguments

x

an object of class "multiPhylo".

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 "multiPhylo" with an attribute "old.index" indicating which trees of the original list are similar (the tree of smaller index is taken as reference).

Author(s)

Emmanuel Paradis

See Also

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

Examples

TR <- rmtree(50, 4)
length(unique(TR)) # not always 15...
howmanytrees(4)

ape documentation built on March 31, 2023, 6:56 p.m.