Learn R Programming

dispRity (version 1.7.0)

add.tree: Add, get or remove tree

Description

Adding, extracting or removing the tree component from a dispRity object

Usage

add.tree(data, tree)

get.tree(data)

remove.tree(data)

Arguments

data

A dispRity object.

tree

A phylo or mutiPhylo object.

Author

Thomas Guillerme

See Also

custom.subsets, chrono.subsets, boot.matrix, dispRity.

Examples

Run this code
## Loading a dispRity object
data(disparity)
## Loading a tree
data(BeckLee_tree)

## Removing  the tree from the dispRity object
(tree_data <- remove.tree(disparity))

## Extracting the tree
get.tree(tree_data) # is null

## Adding a tree to the disparity object
tree_data <- add.tree(tree_data, tree = BeckLee_tree)

## Extracting the tree
get.tree(tree_data) # is a "phylo" object

Run the code above in your browser using DataLab