https://github.com/cran/ape
Raw File
Tip revision: 1cc829686d99940a4b33db84093c0b2adf38bfa3 authored by Emmanuel Paradis on 07 May 2008, 00:00:00 UTC
version 2.2
Tip revision: 1cc8296
as.phylo.formula.Rd
\name{as.phylo.formula}
\alias{as.phylo.formula}
\title{ Conversion from Taxonomy Variables to Phylogenetic Trees }
\description{
  The function \code{as.phylo.formula} (short form \code{as.phylo})
  builds a phylogenetic tree (an object of class \code{phylo}) from
  a set of nested taxonomic variables.
}
\usage{
\method{as.phylo}{formula}(x, data = parent.frame(), ...)
}
\arguments{
  \item{x}{ a right-side formula describing the taxonomic relationship: \code{~C1/C2/.../Cn}. }
  \item{data}{ the data.frame where to look for the variables (default to environment). }
  \item{\dots}{ further arguments to be passed from other methods.}
}
\details{
  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}.
	In most cases, the resulting tree will be unresolved and contain polytomies.
}
\value{
  An object of class \code{phylo}.
}
\author{Julien Dutheil \email{Julien.Dutheil@univ-montp2.fr}}
\seealso{ \code{\link{as.phylo}}, \code{\link{read.tree}} for a description of \code{phylo} objects, \code{\link{multi2di}} }
\examples{
data(carnivora)
plot(as.phylo(~SuperFamily/Family/Genus/Species, data=carnivora))
}
\keyword{manip}
back to top