o drop.tip() failed with some trees (fixed by Yan Wong).
+ o seg.sites() failed with a list.
+
OTHER CHANGES
Package: ape
Version: 2.2
-Date: 2008-04-18
+Date: 2008-04-24
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong,
Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel,
-## DNA.R (2008-03-10)
+## DNA.R (2008-04-24)
## Manipulations and Comparisons of DNA Sequences
BF
}
-GC.content <- function(x)
-{
- BF <- base.freq(x)
- sum(BF[2:3])
-}
+GC.content <- function(x) sum(base.freq(x)[2:3])
seg.sites <- function(x)
{
+ if (is.list(x)) x <- as.matrix(x)
n <- dim(x)
s <- n[2]
n <- n[1]
}
}
-### by EP:
+## by EP:
corPagel <- function(value, phy, form = ~1, fixed = FALSE)
{
layout(matrix(1:2, 2, 1), heights = c(1, 3))
par(mar = c(0.1, leftmar, 0.1, 0.1))
plot(1:L, attr(x, "number"), type = "h", col = barcol, xlim = c(1, L),
- xlab = "", ylab = "Number", xaxt = "n", bty = "n")
+ xlab = "", ylab = "Frequency", xaxt = "n", bty = "n")
plot(0, type = "n", xlim = c(1, L), ylim = c(1, n),
xlab = "", ylab = "", xaxt = "n", yaxt = "n")
for (i in 1:L) points(rep(i, length(x[[i]])), x[[i]], ...)
function (x, y, assoc = NULL, use.edge.length = FALSE, space = 0,
length.line = 1, gap = 2, type = "phylogram",
rotate = FALSE, col = "red", show.tip.label = TRUE,
- font = 3)
+ font = 3, ...)
{
if (is.null(assoc)) {
assoc <- matrix(ncol = 2)
function (x, y, assoc = assoc, use.edge.length = use.edge.length,
space = space, length.line = length.line, gap = gap,
type = type, return = return, col = col,
- show.tip.label = show.tip.label, font = font)
+ show.tip.label = show.tip.label, font = font, ...)
{
res <- list()
plot.phylo.coor <-
function (x, type = "phylogram", use.edge.length = TRUE, node.pos = NULL,
- direction = "rightwards")
+ direction = "rightwards", ...)
{
Ntip <- length(x$tip.label)
if (Ntip == 1)
-## summary.phylo.R (2008-02-28)
+## summary.phylo.R (2008-04-22)
## Print Summary of a Phylogeny
str.multiPhylo <- function(object, ...)
{
class(object) <- NULL
+ cat('Class "multiPhylo"\n')
str(object, ...)
}
\seealso{\code{\link{compar.lynch}}}
\examples{
### Example from Harvey and Pagel's book:
+\dontrun{
y<-c(10,8,3,4)
W <- matrix(c(1,1/6,1/6,1/6,1/6,1,1/2,1/2,1/6,1/2,1,1,1/6,1/2,1,1), 4)
compar.cheverud(y,W)
-
+}
### Example from Rohlf's 2001 article:
W<- matrix(c(
0,1,1,2,0,0,0,0,
This function plots two trees face to face with the links if specified. It is possible to rotate the branches of each tree around the nodes by clicking.
}
\usage{
-plot.cophylo(phy1, phy2, assoc=NULL, use.edge.length=FALSE,space=0, length.line=1, gap=2, type="phylogram", rotate=FALSE, col="red", show.tip.label=TRUE, font=3)
+plot.cophylo(x, y, assoc=NULL, use.edge.length=FALSE,space=0,
+length.line=1, gap=2, type="phylogram", rotate=FALSE, col="red",
+show.tip.label=TRUE, font=3, \dots)
}
\arguments{
- \item{phy1, phy2}{two objects of class \code{"phylo"}.}
+ \item{x, y}{two objects of class \code{"phylo"}.}
\item{assoc}{a matrix with 2 columns specifying the associations between the tips. If NULL, no links will be drawn.}
\item{use.edge.length}{a logical indicating whether the branch lengths should be used to plot the trees; default is FALSE.}
\item{space}{a positive value that specifies the distance between the two trees.}
\item{rotate}{a logical indicating whether the nodes of the phylogeny can be rotated by clicking. Default is FALSE.}
\item{col}{a character string indicating the color to be used for the links. Default is red.}
\item{show.tip.label}{a logical indicating whether to show the tip labels on the phylogeny (defaults to 'TRUE', i.e. the labels are shown).}
- \item{font}{an integer specifying the type of font for the labels: 1 (plain text), 2 (bold), 3 (italic, the default), or 4 (bold italic).}
+ \item{font}{an integer specifying the type of font for the labels: 1
+ (plain text), 2 (bold), 3 (italic, the default), or 4 (bold
+ italic).}
+ \item{\dots}{(unused)}
}
\details{
The aim of this function is to plot simultaneously two phylogenetic trees with associated taxa. The two trees do not necessarily have the same number of tips and more than one tip in one phylogeny can be associated with a tip in the other.
(supposedly large) and a portion of it determined by clicking on the nodes of the phylogeny. On exit, returns the last subtree visualized.
}
\usage{
-subtreeplot(phy, wait=FALSE, ...)
+subtreeplot(x, wait=FALSE, ...)
}
\arguments{
\alias{subtrees}
\title{All subtrees of a Phylogenetic Tree}
\usage{
-subtrees(x, wait=FALSE)
+subtrees(tree, wait=FALSE)
}
\arguments{
- \item{x}{an object of class \code{"phylo"}.}
+ \item{tree}{an object of class \code{"phylo"}.}
\item{wait}{a logical indicating whether the node beeing processed should be printed (useful for big phylogenies).}
}
\description{
This function returns a list of all the subtrees of a phylogenetic tree.
}
\author{Damien de Vienne \email{damien.de-vienne@u-psud.fr}}
-\see also{
+\seealso{
\code{\link{zoom}}, \code{\link{subtreeplot}} for functions extracting particular subtrees.
}
\value{
- \code{subtrees} returns a list of trees of class \code{"phylo"} and returns invisibly for each subtree a list with the following
+ \code{subtrees} returns a list of trees of class \code{"phylo"} and
+ returns invisibly for each subtree a list with the following
components:
\item{tip.label}
for (i in 1:11) plot(l[[i]], sub=paste("Node", l[[i]]$node.label[1]))
par(mfrow=c(1,1))
}
+\keyword{manip}