]> git.donarmstrong.com Git - ape.git/blob - man/coalescent.intervals.Rd
add delta.plot + clarify doc in write.tree.Rd
[ape.git] / man / coalescent.intervals.Rd
1 \name{coalescent.intervals}
2 \alias{coalescent.intervals}
3 \alias{coalescent.intervals.phylo}
4 \alias{coalescent.intervals.default}
5
6 \title{Coalescent Intervals}
7 \usage{
8 coalescent.intervals(x)
9 }
10 \arguments{
11   \item{x}{either an ultra-metric phylogenetic tree (i.e. an object of
12     class \code{"phylo"}) or, alternatively, a vector of interval lengths.}
13 }
14 \description{
15  This function extracts or generates information about coalescent intervals
16  (number of lineages, interval lengths, interval count, total depth) from
17  a phylogenetic tree or a list of internode distances. The input tree
18  needs to be ultra-metric (i.e. clock-like).
19 }
20 \value{
21 An object of class \code{"coalescentIntervals"} with the following entries:
22
23   \item{lineages}{ A vector with the number of lineages at the start of each coalescent
24     interval.}
25   \item{interval.length}{ A vector with the length of each coalescent
26     interval.}
27   \item{interval.count}{ The total number of coalescent
28     intervals.}
29   \item{total.depth}{ The sum of the lengths of all coalescent
30     intervals.}
31 }
32 \seealso{
33 \code{\link{branching.times}}, \code{\link{collapsed.intervals}},
34 \code{\link{read.tree}}.
35 }
36
37 \author{Korbinian Strimmer (\url{http://www.stat.uni-muenchen.de/~strimmer/})}
38
39 \examples{
40 data("hivtree.newick") # example tree in NH format
41 tree.hiv <- read.tree(text = hivtree.newick) # load tree
42
43 ci <- coalescent.intervals(tree.hiv) # from tree
44 ci
45
46 data("hivtree.table") # same tree, but in table format
47 ci <- coalescent.intervals(hivtree.table$size) # from vector of interval lengths
48 ci
49 }
50 \keyword{manip}