as.phylo.formula
(short form as.phylo
)
builds a phylogenetic tree (an object of class phylo
) from
a set of nested taxonomic variables.## S3 method for class 'formula':
as.phylo(x, data = parent.frame(), ...)
~C1/C2/.../Cn
.phylo
.~Order/Family/Genus/Species
.
In most cases, the resulting tree will be unresolved and contain polytomies.as.phylo
, read.tree
for a description of phylo
objects, multi2di
data(carnivora)
plot(as.phylo(~SuperFamily/Family/Genus/Species, data=carnivora))
Run the code above in your browser using DataLab