File: coalescent.intervals.Rd

package info (click to toggle)
r-cran-ape 5.8-1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,676 kB
  • sloc: ansic: 7,676; cpp: 116; sh: 17; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,519 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\name{coalescent.intervals}
\alias{coalescent.intervals}
\alias{coalescent.intervals.phylo}
\alias{coalescent.intervals.default}
\title{Coalescent Intervals}
\usage{
coalescent.intervals(x)
}
\arguments{
  \item{x}{either an ultra-metric phylogenetic tree (i.e. an object of
    class \code{"phylo"}) or, alternatively, a vector of interval lengths.}
}
\description{
 This function extracts or generates information about coalescent intervals
 (number of lineages, interval lengths, interval count, total depth) from
 a phylogenetic tree or a list of internode distances. The input tree
 needs to be ultra-metric (i.e. clock-like).
}
\value{
An object of class \code{"coalescentIntervals"} with the following entries:

  \item{lineages}{ A vector with the number of lineages at the start of each coalescent
    interval.}
  \item{interval.length}{ A vector with the length of each coalescent
    interval.}
  \item{interval.count}{ The total number of coalescent
    intervals.}
  \item{total.depth}{ The sum of the lengths of all coalescent
    intervals.}
}
\seealso{
\code{\link{branching.times}}, \code{\link{collapsed.intervals}},
\code{\link{read.tree}}.
}
\author{Korbinian Strimmer}
\examples{
data("hivtree.newick") # example tree in NH format
tree.hiv <- read.tree(text = hivtree.newick) # load tree
ci <- coalescent.intervals(tree.hiv) # from tree
ci
data("hivtree.table") # same tree, but in table format
ci <- coalescent.intervals(hivtree.table$size) # from vector of interval lengths
ci
}
\keyword{manip}