File: as.bitsplits.Rd

package info (click to toggle)
r-cran-ape 5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,932 kB
  • sloc: ansic: 7,626; cpp: 116; sh: 17; makefile: 2
file content (66 lines) | stat: -rw-r--r-- 2,285 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
\name{as.bitsplits}
\alias{as.bitsplits}
\alias{as.bitsplits.prop.part}
\alias{print.bitsplits}
\alias{sort.bitsplits}
\alias{bitsplits}
\alias{countBipartitions}
\alias{as.prop.part}
\alias{as.prop.part.bitsplits}
\title{Split Frequencies and Conversion Among Split Classes}
\description{
  \code{bitsplits} returns the bipartitions (aka splits) for a single
  tree or a list of trees. If at least one tree is rooted, an error is
  returned.

  \code{countBipartitions} returns the frequencies of the bipartitions
  from a reference tree (phy) observed in a list of trees (X), all unrooted.

  \code{as.bitsplits} and \code{as.prop.part} are generic functions for
  converting between the \code{"bitsplits"} and \code{"prop.part"}
  classes.
}
\usage{
bitsplits(x)
countBipartitions(phy, X)
as.bitsplits(x)
\method{as.bitsplits}{prop.part}(x)
\method{print}{bitsplits}(x, ...)
\method{sort}{bitsplits}(x, decreasing = FALSE, ...)
as.prop.part(x, ...)
\method{as.prop.part}{bitsplits}(x, include.trivial = FALSE, ...)
}
\arguments{
  \item{x}{an object of the appropriate class.}
  \item{phy}{an object of class \code{"phylo"}.}
  \item{X}{an object of class \code{"multiPhylo"}.}
  \item{decreasing}{a logical value to sort the bipartitions in
    increasing (the default) or decreasing order of their frequency.}
  \item{include.trivial}{a logical value specifying whether to include
    the trivial split with all tips in the returned object.}
  \item{\dots}{further arguments passed to or from other methods.}
}
\details{
  These functions count bipartitions as defined by internal branches, so
  they not work only with unrooted trees. The structure of the class
  \code{"bitsplits"} is described in a separate document on ape's web
  site.
}
\value{
  \code{bitsplits}, \code{as.bitsplits}, and \code{sort} return an object
  of class \code{"bitsplits"}.

  \code{countBipartitions} returns a vector of integers.

  \code{as.prop.part} returns an object of class \code{"prop.part"}.
}
\author{Emmanuel Paradis}
\seealso{\code{\link{prop.part}}, \code{\link{is.compatible}}}
\examples{
tr <- rtree(20)
pp <- prop.part(tr)
as.bitsplits(pp)
## works only with unrooted trees (ape 5.5):
countBipartitions(rtree(10, rooted = FALSE), rmtree(100, 10, rooted = FALSE))
}
\keyword{manip}