]> git.donarmstrong.com Git - ape.git/blob - man/as.phylo.formula.Rd
final packing for ape 2.7
[ape.git] / man / as.phylo.formula.Rd
1 \name{as.phylo.formula}
2 \alias{as.phylo.formula}
3 \title{ Conversion from Taxonomy Variables to Phylogenetic Trees }
4 \description{
5   The function \code{as.phylo.formula} (short form \code{as.phylo})
6   builds a phylogenetic tree (an object of class \code{phylo}) from
7   a set of nested taxonomic variables.
8 }
9 \usage{
10 \method{as.phylo}{formula}(x, data = parent.frame(), ...)
11 }
12 \arguments{
13   \item{x}{ a right-side formula describing the taxonomic relationship: \code{~C1/C2/.../Cn}. }
14   \item{data}{ the data.frame where to look for the variables (default to environment). }
15   \item{\dots}{ further arguments to be passed from other methods.}
16 }
17 \details{
18   Taxonomic variables must be nested and passed in the correct order: the higher clade must be on the left of the formula, for instance \code{~Order/Family/Genus/Species}.
19         In most cases, the resulting tree will be unresolved and contain polytomies.
20 }
21 \value{
22   An object of class \code{phylo}.
23 }
24 \author{Julien Dutheil \email{Julien.Dutheil@univ-montp2.fr}}
25 \seealso{ \code{\link{as.phylo}}, \code{\link{read.tree}} for a description of \code{phylo} objects, \code{\link{multi2di}} }
26 \examples{
27 data(carnivora)
28 plot(as.phylo(~SuperFamily/Family/Genus/Species, data=carnivora))
29 }
30 \keyword{manip}