ReorderData: Reorders trait data to match the order of tips in a tree

Description Usage Arguments Details Author(s) References

View source: R/ReorderData.R

Description

This function takes a vector, matrix, or dataframe and reorders the data to match the order of tips in a phylo object.

Usage

1
ReorderData(tree, data, taxa.names="row names")

Arguments

tree

a phylo object

data

a vector, matrix, dataframe set of taxa names as present in the tree and data must match. If data is a vector it should be a named vector. If the data is a matrix or dataframe the taxa names may be row names or present in a column.

taxa.names

If taxa names are present in a column the column number should be supplied. If taxa names are the row names the argument can be set to "row names" (default setting). If the data is being supplied in a vector this argument is not used.

Details

Returns data in the same format as supplied but reordered to match the order of tip labels.

Author(s)

Heath Blackmon

References

http://coleoguy.github.io/


evobiR documentation built on May 2, 2019, 5:40 a.m.