make.dispRity: Make and fill 'dispRity'.

View source: R/dispRity.utilities.R

make.dispRityR Documentation

Make and fill dispRity.

Description

Creating an empty dispRity object from a matrix

Usage

make.dispRity(data, tree, call, subsets)

fill.dispRity(data, tree, check)

remove.dispRity(data, what)

Arguments

data

A matrix.

tree

Optional, a phylo or multiPhylo object.

call

Optional, a list to be a dispRity call.

subsets

Optional, a list to be a dispRity subsets list.

check

Logical, whether to check the data (TRUE; default, highly advised) or not (FALSE).

what

Which elements to remove. Can be any of the following: "subsets", "bootstraps", "covar", "tree", "disparity". See details.

Details

When using remove.dispRity, the function recursively removes any other data depending on "what". For example, for a data with disparity calculated for bootstrapped subsets, removing the subsets (what = "subsets") also removes the bootstraps and the disparity data. But removing the bootstraps (what = "bootstraps") removes only the bootstraps draws and the disparity relating to the bootstraps (but keeps the subsets and the non-bootstrapped disparity values).

Author(s)

Thomas Guillerme

Examples

## An empty dispRity object
make.dispRity()

## Still an empty dispRity object (with a matrix)
(empty <- make.dispRity(data = matrix(rnorm(12), ncol = 3)))

## A dispRity object with a matrix of 4*3
fill.dispRity(empty)

## A dispRity object with a tree
my_tree <- rtree(4, tip.label = c(1:4))
fill.dispRity(empty, tree = my_tree)


TGuillerme/dispRity documentation built on Dec. 21, 2024, 4:05 a.m.