% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.r
\name{get.convergent}
\alias{get.convergent}
\title{Identify convergent traits}
\usage{
get.convergent(data, trait = NULL)
}
\arguments{
\item{data}{A morpho object}

\item{trait}{The trait number to examine. If \code{NULL} (default), returns a summary.}
}
\value{
A data frame. Without \code{trait}: trait index and number of convergent states.
  With \code{trait}: state, origin, tips, and whether the state is convergent.
}
\description{
Identifies convergent evolution in a morpho object. When called without a
trait, returns a summary of which traits are convergent. When called with a
specific trait, returns tip groupings by state and evolutionary origin.
}
\examples{
phy <- ape::rtree(10)
morpho_data <- sim.morpho(tree = phy, k = 2, trait.num = 20)
get.convergent(morpho_data)
get.convergent(morpho_data, trait = 3)

}
