This is mostly the function as.phylo.formula
from the ape package
but modified so that interior nodes get labeled.
Note: assumes that there are NOT single quotes around the labels.
tax_table_to_phylo(x, data = parent.frame(), collapse = TRUE, ...)
x | a right-side formula describing the taxonomic relationship:
|
---|---|
data | the data.frame where to look for the variables (default to user's workspace). |
collapse | a logical value specifying whether to collapse single nodes in the returned tree (see details). |
... | further arguments to be passed from other methods. |
Julien Dutheil dutheil@evolbio.mpg.de and Eric Marcon, modified by Jacob Bien