make.treedata: Function for making an object of class treedata
Description
This function generates an object of class treedata that ensures that the ordering of tip labels
and data remain intact. The object can be manipulated using dplyr functions.
An optional argument that specifies the column of data that contains the
names to be matched to the tree. By default, it is set to "detect" which finds the column with the
most matches to the tree (including
the rownames).
as.is
Whether convert to factors. When FALSE (default), convert character vectors to factors.
Value
An object of class "treedata". The tree is pruned of tips not represented in the data,
and the data is filtered for taxa not in the tree. The data is returned as a data frame tble that is
compatible with dplyr functions.