rescale.rooted.tree {phyclust} | R Documentation

## Rescale a Rooted Tree's Height

### Description

This function rescaled the input rooted tree height by a scale.height.

### Usage

    rescale.rooted.tree(rooted.tree, scale.height = 1)

### Arguments

`rooted.tree` | a rooted tree in `Class phylo`.
`scale.height` | a scale to all branch lengths.

### Details

The `rooted.tree` should be in a `phylo` class of ape, and may be created by `ms`.

`scale.height` is a positive number multiplying on the lengths of all branches of the rooted tree.

### Value

Return a rooted tree in `Class phylo` with scaled branches.

### Author(s)

Wei-Chen Chen wccsnow@gmail.com

### References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

### See Also

`ms`, `read.tree`, `as.phylo`, `get.rooted.tree.height`.

### Examples

    ## Not run:
    library(phyclust, quiet = TRUE)

    set.seed(1234)
    ret.ms <- ms(5, 1, opts = paste("-T", sep = " "))
    tree.ms <- read.tree(text = ret.ms[3])
    get.rooted.tree.height(tree.ms)

    tree.scaled <- rescale.rooted.tree(tree.ms, scale.height = 2)
    get.rooted.tree.height(tree.scaled)

    ## End(Not run)

[Package phyclust version 0.1-25 Index]