Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

match_to_tree

Match vector of counts to phylogenetic tree


Description

Match vector of counts to phylogenetic tree

Usage

match_to_tree(x, tree, x_labels = NULL)

Arguments

x

A vector of species counts.

tree

A phylogenetic tree of class "phylo".

x_labels

A vector of species labels for x.

Details

This function applies a couple of different methods to arrange the data in x to match a phylogenetic tree.

  • If x_labels is provided, we use this vector to match the elements of x with the tip labels in the tree.

  • If x_labels is not provided and x is a named vector, we use the names to match the tip labels in the tree.

  • If x_labels is not provided and x is not named, we assume that x is already in the correct order, check that the length of x matches the number of tips in the tree, and return x.

Value

The vector x, re-arranged to match the tree.


abdiv

Alpha and Beta Diversity Measures

v0.2.0
MIT + file LICENSE
Authors
Kyle Bittinger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.