R: Reduced consensus, omitting specified taxa

ConsensusWithout {TreeTools} | R Documentation

## Reduced consensus, omitting specified taxa

### Description

`ConsensusWithout()` displays a consensus plot with specified taxa excluded, which can be a useful way to increase the resolution of a consensus tree when a few wildcard taxa obscure a consistent set of relationships. `MarkMissing()` adds missing taxa as loose leaves on the plot.

### Usage

    ConsensusWithout(trees, tip = character(0), ...)

    ## S3 method for class 'phylo'
    ConsensusWithout(trees, tip = character(0), ...)

    ## S3 method for class 'multiPhylo'
    ConsensusWithout(trees, tip = character(0), ...)

    ## S3 method for class 'list'
    ConsensusWithout(trees, tip = character(0), ...)

    MarkMissing(tip, position = "bottomleft", ...)

### Arguments

`trees` | A list of phylogenetic trees, of class `multiPhylo` or `list`.
`tip` | A character vector specifying the names (or numbers) of tips to drop (using `ape::drop.tip()`).
`...` | Additional parameters to pass on to `ape::consensus()` or `legend()`.
`position` | Where to plot the missing taxa. See `legend()` for options.

### Value

`ConsensusWithout()` returns a consensus tree (of class `phylo`) without the excluded taxa.

`MarkMissing()` provides a null return, after plotting the specified `tip`s as a legend.

### Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

### See Also

Other tree manipulation: `AddTip()`, `CollapseNode()`, `DropTip()`, `EnforceOutgroup()`, `ImposeConstraint()`, `LeafLabelInterchange()`, `MakeTreeBinary()`, `RenumberTips()`, `RenumberTree()`, `Renumber()`, `RootTree()`, `SingleTaxonTree()`, `SortTree()`, `Subtree()`

Other tree properties: `NSplits()`, `NTip()`, `SplitsInBinaryTree()`, `TipLabels()`, `TreeIsRooted()`

Other consensus tree functions: `Consensus()`

### Examples

    oldPar <- par(mfrow = c(1, 2), mar = rep(0.5, 4))

    # Two trees differing only in placement of tip 2:
    trees <- as.phylo(c(0, 53), 6)
    plot(trees[[1]])
    plot(trees[[2]])

    # Strict consensus (left panel) lacks resolution:
    plot(ape::consensus(trees))

    # But omitting tip two (right panel) reveals shared structure in common:
    plot(ConsensusWithout(trees, 't2'))
    MarkMissing('t2')

    par(oldPar)

[Package TreeTools version 1.5.1 Index]